Home
last modified time | relevance | path

Searched +full:i2c +full:- +full:mux (Results 1 – 25 of 178) sorted by relevance

12345678

/linux-3.3/drivers/i2c/
Di2c-mux.c2 * Multiplexed I2C bus driver.
4 * Copyright (c) 2008-2009 Rodolfo Giometti <giometti@linux.it>
5 * Copyright (c) 2008-2009 Eurotech S.p.A. <info@eurotech.it>
6 * Copyright (c) 2009-2010 NSN GmbH & Co KG <michael.lawnick.ext@nsn.com>
8 * Simplifies access to complex multiplexed I2C bus topologies, by presenting
9 * each multiplexed bus segment as an additional I2C adapter.
10 * Supports multi-level mux'ing (mux behind a mux).
13 * i2c-virt.c from Kumar Gala <galak@kernel.crashing.org>
14 * i2c-virtual.c from Ken Harrenstien, Copyright (c) 2004 Google, Inc.
15 * i2c-virtual.c from Brian Kuschak <bkuschak@yahoo.com>
[all …]
DMakefile2 # Makefile for the i2c core.
5 obj-$(CONFIG_I2C_BOARDINFO) += i2c-boardinfo.o
6 obj-$(CONFIG_I2C) += i2c-core.o
7 obj-$(CONFIG_I2C_SMBUS) += i2c-smbus.o
8 obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
9 obj-$(CONFIG_I2C_MUX) += i2c-mux.o
10 obj-y += algos/ busses/ muxes/
12 ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG
13 CFLAGS_i2c-core.o := -Wno-deprecated-declarations
/linux-3.3/drivers/i2c/muxes/
Dgpio-i2cmux.c2 * I2C multiplexer using GPIO API
11 #include <linux/i2c.h>
12 #include <linux/i2c-mux.h>
13 #include <linux/gpio-i2cmux.h>
26 static void gpiomux_set(const struct gpiomux *mux, unsigned val) in gpiomux_set() argument
30 for (i = 0; i < mux->data.n_gpios; i++) in gpiomux_set()
31 gpio_set_value(mux->data.gpios[i], val & (1 << i)); in gpiomux_set()
36 struct gpiomux *mux = data; in gpiomux_select() local
38 gpiomux_set(mux, mux->data.values[chan]); in gpiomux_select()
45 struct gpiomux *mux = data; in gpiomux_deselect() local
[all …]
DKconfig2 # Multiplexer I2C chip drivers configuration
5 menu "Multiplexer I2C Chip support"
9 tristate "GPIO-based I2C multiplexer"
13 GPIO based I2C multiplexer. This driver provides access to
14 I2C busses connected through a MUX, which is controlled
18 will be called gpio-i2cmux.
21 tristate "NXP PCA9541 I2C Master Selector"
25 I2C Master Selector.
31 tristate "Philips PCA954x I2C Mux/switches"
35 I2C mux/switch devices.
Dpca954x.c2 * I2C multiplexer
4 * Copyright (c) 2008-2009 Rodolfo Giometti <giometti@linux.it>
5 * Copyright (c) 2008-2009 Eurotech S.p.A. <info@eurotech.it>
7 * This module supports the PCA954x series of I2C multiplexer/switch chips
13 * These chips are all controlled via the I2C bus itself, and all have a
14 * single 8-bit register. The upstream "parent" bus fans out to two,
17 * mux can select only one sub-bus at a time; a switch can select any
29 * i2c-virtual_cb.c from Brian Kuschak <bkuschak@yahoo.com>
31 * pca9540.c from Jean Delvare <khali@linux-fr.org>.
42 #include <linux/i2c.h>
[all …]
/linux-3.3/Documentation/i2c/muxes/
Dgpio-i2cmux1 Kernel driver gpio-i2cmux
6 -----------
8 gpio-i2cmux is an i2c mux driver providing access to I2C bus segments
9 from a master I2C bus and a hardware MUX controlled through GPIO pins.
13 ---------- ---------- Bus segment 1 - - - - -
14 | | SCL/SDA | |-------------- | |
15 | |------------| |
17 | Linux | GPIO 1..N | MUX |--------------- Devices
18 | |------------| | | |
20 | | | |---------------| |
[all …]
/linux-3.3/sound/soc/codecs/
Dwm8903.c2 * wm8903.c -- WM8903 ALSA SoC Audio driver
14 * - TDM mode configuration.
15 * - Digital microphone support.
25 #include <linux/i2c.h>
43 { 4, 0x0018 }, /* R4 - Bias Control 0 */
44 { 5, 0x0000 }, /* R5 - VMID Control 0 */
45 { 6, 0x0000 }, /* R6 - Mic Bias Control 0 */
46 { 8, 0x0001 }, /* R8 - Analogue DAC 0 */
47 { 10, 0x0001 }, /* R10 - Analogue ADC 0 */
48 { 12, 0x0000 }, /* R12 - Power Management 0 */
[all …]
Dwm8750.c2 * wm8750.c -- WM8750 ALSA SoC audio driver
20 #include <linux/i2c.h>
116 SOC_ENUM("Playback De-emphasis", wm8750_enum[15]),
129 SOC_ENUM("Treble Cut-off", wm8750_enum[2]),
133 SOC_ENUM("3D Lower Cut-off", wm8750_enum[3]),
134 SOC_ENUM("3D Upper Cut-off", wm8750_enum[4]),
157 /* ADCDAC Bit 0 - ADCHPD */
158 /* ADCDAC Bit 4 - HPOR */
159 /* ADCTL1 Bit 2,3 - DATSEL */
160 /* ADCTL1 Bit 4,5 - DMONOMIX */
[all …]
Dwm8971.c2 * wm8971.c -- WM8971 ALSA SoC Audio driver
21 #include <linux/i2c.h>
131 SOC_ENUM("Treble Cut-off", wm8971_enum[2]),
152 SOC_ENUM("Playback De-emphasis", wm8971_enum[5]),
187 /* Left Line Mux */
191 /* Right Line Mux */
195 /* Left PGA Mux */
199 /* Right PGA Mux */
203 /* Mono ADC Mux */
230 SND_SOC_DAPM_MUX("Left PGA Mux", WM8971_PWR1, 5, 0,
[all …]
Dwm8988.c2 * wm8988.c -- WM8988 ALSA SoC audio driver
19 #include <linux/i2c.h>
105 static const DECLARE_TLV_DB_SCALE(pga_tlv, -1725, 75, 0);
106 static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1);
107 static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
108 static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
109 static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0);
118 SOC_ENUM("Treble Cut-off", treble),
122 SOC_ENUM("3D Lower Cut-off", stereo_3d_lc),
123 SOC_ENUM("3D Upper Cut-off", stereo_3d_uc),
[all …]
Duda1380.c2 * uda1380.c - Philips UDA1380 ALSA SoC audio driver
8 * Copyright (c) 2007-2009 Philipp Zabel <philipp.zabel@gmail.com>
24 #include <linux/i2c.h>
66 u16 *cache = codec->reg_cache; in uda1380_read_reg_cache()
70 return -1; in uda1380_read_reg_cache()
80 u16 *cache = codec->reg_cache; in uda1380_write_reg_cache()
85 set_bit(reg - 0x10, &uda1380_cache_dirty); in uda1380_write_reg_cache()
111 if (!codec->active && (reg >= UDA1380_MVOL)) in uda1380_write()
114 if (codec->hw_write(codec->control_data, data, 3) == 3) { in uda1380_write()
116 i2c_master_send(codec->control_data, data, 1); in uda1380_write()
[all …]
Dak4641.c2 * ak4641.c -- AK4641 ALSA Soc Audio driver
19 #include <linux/i2c.h>
58 if (ak4641->deemph && deemph_settings[i] != 0 && in ak4641_set_deemph()
59 abs(deemph_settings[i] - ak4641->playback_fs) < in ak4641_set_deemph()
60 abs(deemph_settings[best] - ak4641->playback_fs)) in ak4641_set_deemph()
63 if (!ak4641->deemph && deemph_settings[i] == 0) in ak4641_set_deemph()
67 dev_dbg(codec->dev, "Set deemphasis %d\n", best); in ak4641_set_deemph()
77 int deemph = ucontrol->value.enumerated.item[0]; in ak4641_put_deemph()
80 return -EINVAL; in ak4641_put_deemph()
82 ak4641->deemph = deemph; in ak4641_put_deemph()
[all …]
Dtlv320aic3x.c20 * ---------------------------------------
21 * MONO_LOUT -> N/A | MONO_LOUT -> N/A
22 * | IN1L -> LINE1L
23 * | IN1R -> LINE1R
24 * | IN2L -> LINE2L
25 * | IN2R -> LINE2R
26 * | MIC3L/R -> N/A
29 * ---------------------------------------
40 #include <linux/i2c.h>
126 * wanting to read volatile bits from those registers that has both read-only
[all …]
Dcs42l51.c8 * Based on cs4270.c - Copyright (c) Freescale Semiconductor
20 * - Only I2C is support. Not SPI
21 * - master mode *NOT* supported
32 #include <linux/i2c.h>
45 unsigned int audio_mode; /* The mode (I2S or left-justified) */
57 u8 *cache = codec->reg_cache + 1; in cs42l51_fill_cache()
58 struct i2c_client *i2c_client = to_i2c_client(codec->dev); in cs42l51_fill_cache()
64 dev_err(&i2c_client->dev, in cs42l51_fill_cache()
65 "I2C read failure, addr=0x%x (ret=%d vs %d)\n", in cs42l51_fill_cache()
66 i2c_client->addr, length, CS42L51_NUMREGS); in cs42l51_fill_cache()
[all …]
Dalc5623.c2 * alc5623.c -- alc562[123] ALSA Soc Audio driver
7 * Copyright 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
23 #include <linux/i2c.h>
51 int i, step = codec->driver->reg_cache_step; in alc5623_fill_cache()
52 u16 *cache = codec->reg_cache; in alc5623_fill_cache()
55 codec->cache_bypass = 1; in alc5623_fill_cache()
56 for (i = 0 ; i < codec->driver->reg_cache_size ; i += step) in alc5623_fill_cache()
58 codec->cache_bypass = 0; in alc5623_fill_cache()
69 /* to power-on/off class-d amp generators/speaker */ in amp_mixer_event()
70 /* need to write to 'index-46h' register : */ in amp_mixer_event()
[all …]
Dwm8753.c2 * wm8753.c -- WM8753 ALSA Soc Audio driver
16 * Dual DAI:-
27 * Fast DAI switching:-
40 #include <linux/i2c.h>
117 static const char *wm8753_line_mix[] = {"Line 1 + 2", "Line 1 - 2",
122 static const char *wm8753_rxmsel[] = {"RXP - RXN", "RXP + RXN", "RXP", "RXN"};
129 static const char *wm8753_radcsel[] = {"PGA", "Line or RXP-RXN", "Sidetone"};
130 static const char *wm8753_ladcsel[] = {"PGA", "Line or RXP-RXN", "Line"};
181 ucontrol->value.integer.value[0] = wm8753->dai_func; in wm8753_get_dai()
192 if (wm8753->dai_func == ucontrol->value.integer.value[0]) in wm8753_set_dai()
[all …]
D88pm860x-codec.c2 * 88pm860x-codec.c -- 88PM860x ALSA SoC Audio Driver
14 #include <linux/i2c.h>
28 #include "88pm860x-codec.h"
119 * This widget should be just after DAC & PGA in DAPM power-on sequence and
120 * before DAC & PGA in DAPM power-off sequence.
144 struct i2c_client *i2c; member
152 /* -9450dB to 0dB in 150dB steps ( mute instead of -9450dB) */
153 static const DECLARE_TLV_DB_SCALE(dpga_tlv, -9450, 150, 1);
155 /* -9dB to 0db in 3dB steps */
156 static const DECLARE_TLV_DB_SCALE(adc_tlv, -900, 300, 0);
[all …]
Dak4535.c2 * ak4535.c -- AK4535 ALSA Soc Audio driver
20 #include <linux/i2c.h>
48 static const char *ak4535_mono_gain[] = {"+6dB", "-17dB"};
49 static const char *ak4535_mono_out[] = {"(L + R)/2", "Hi-Z"};
103 /* Input mux */
134 SND_SOC_DAPM_MUX("Input Mux", SND_SOC_NOPM, 0, 0,
186 {"Input Mux", "Internal", "Mic Int Bias"},
187 {"Input Mux", "External", "Mic Ext Bias"},
190 {"MICOUT", NULL, "Input Mux"},
234 struct snd_soc_codec *codec = codec_dai->codec; in ak4535_set_dai_sysclk()
[all …]
Dwm8996.c2 * wm8996.c - WM8996 audio codec interface
21 #include <linux/i2c.h>
111 regcache_mark_dirty(wm8996->regmap); \
482 static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -3600, 150, 0);
483 static const DECLARE_TLV_DB_SCALE(digital_tlv, -7200, 75, 1);
484 static const DECLARE_TLV_DB_SCALE(out_digital_tlv, -1200, 150, 0);
485 static const DECLARE_TLV_DB_SCALE(out_tlv, -900, 75, 0);
486 static const DECLARE_TLV_DB_SCALE(spk_tlv, -900, 150, 0);
487 static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
488 static const DECLARE_TLV_DB_SCALE(threedstereo_tlv, -1600, 183, 1);
[all …]
/linux-3.3/sound/pci/emu10k1/
Dp17v.h2 * Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /* Audigy2Value Tina (P17V) pointer-offset register set,
27 /* 00 - 07: Not used */
31 /* 09 - 12: Not used */
35 /* 14 - 17: Not used */
39 /* 1b - 1f: Not used */
40 /* 20 - 2f: Not used */
41 /* 30 - 3b: Not used */
43 #define P17V_I2C_ADDR 0x3d /* I2C Address */
[all …]
/linux-3.3/include/linux/
Dgpio-i2cmux.h2 * gpio-i2cmux interface to platform code
14 /* MUX has no specific idle mode */
15 #define GPIO_I2CMUX_NO_IDLE ((unsigned)-1)
18 * struct gpio_i2cmux_platform_data - Platform-dependent data for gpio-i2cmux
19 * @parent: Parent I2C bus adapter number
20 * @base_nr: Base I2C bus number to number adapters from or zero for dynamic
24 * @gpios: Array of GPIO numbers used to control MUX
25 * @n_gpios: Number of GPIOs used to control MUX
26 * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
Di2c-mux.h3 * i2c-mux.h - functions for the i2c-bus mux support
5 * Copyright (c) 2008-2009 Rodolfo Giometti <giometti@linux.it>
6 * Copyright (c) 2008-2009 Eurotech S.p.A. <info@eurotech.it>
30 * Called to create a i2c bus on a multiplexed bus segment.
32 * and deselect callback functions to perform hardware-specific
33 * mux control.
/linux-3.3/Documentation/
Dpinctrl.txt6 - Enumerating and naming controllable pins
8 - Multiplexing of pins, pads, fingers (etc) see below for details
10 - Configuration of pins, pads, fingers (etc), such as software-controlled
11 biasing and driving mode specific pins, such as pull-up/down, open drain,
14 Top-level interface
19 - A pin controller is a piece of hardware, usually a set of registers, that
25 - PINS are equal to pads, fingers, balls or whatever packaging input or
29 be sparse - i.e. there may be gaps in the space with numbers where no
91 See for example arch/arm/mach-u300/Kconfig for an example.
124 on { 0, 8, 16, 24 }, and a group of pins dealing with an I2C interface on pins
[all …]
/linux-3.3/arch/arm/mach-davinci/
Dboard-dm365-evm.c18 #include <linux/i2c.h>
21 #include <linux/i2c/at24.h>
31 #include <asm/mach-types.h>
34 #include <mach/mux.h>
37 #include <mach/i2c.h>
57 #define DM365_EVM_PHY_ID "davinci_mdio-0:01"
59 * A MAX-II CPLD is used for various board control functions.
107 /* UBL (a few copies) plus U-Boot */
111 .mask_flags = MTD_WRITEABLE, /* force read-only */
113 /* U-Boot environment */
[all …]
/linux-3.3/arch/arm/mach-tegra/
Dtegra2_clocks.c2 * arch/arm/mach-tegra/tegra2_clocks.c
68 ((PERIPH_CLK_SOURCE_OSC - PERIPH_CLK_SOURCE_I2S1) / 4)
99 #define PLL_MISC(c) (((c)->flags & PLL_ALT_MISC_REG) ? 0x4 : 0xc)
117 #define PERIPH_CLK_TO_ENB_REG(c) ((c->u.periph.clk_num / 32) * 4)
118 #define PERIPH_CLK_TO_ENB_SET_REG(c) ((c->u.periph.clk_num / 32) * 8)
119 #define PERIPH_CLK_TO_ENB_BIT(c) (1 << (c->u.periph.clk_num % 32))
157 * non-atomically modifies a register used by another clock must lock
183 if (clock_autodetect >= 732 - 3 && clock_autodetect <= 732 + 3) { in clk_measure_input_freq()
185 } else if (clock_autodetect >= 794 - 3 && clock_autodetect <= 794 + 3) { in clk_measure_input_freq()
187 } else if (clock_autodetect >= 1172 - 3 && clock_autodetect <= 1172 + 3) { in clk_measure_input_freq()
[all …]

12345678