Home
last modified time | relevance | path

Searched full:i2c (Results 1 – 25 of 2593) sorted by relevance

12345678910>>...104

/linux-3.3/drivers/i2c/busses/
Di2c-pxa.c4 * I2C adapter for the PXA I2C bus access.
24 #include <linux/i2c.h>
31 #include <linux/i2c-pxa.h>
38 #include <linux/i2c/pxa-i2c.h>
64 * I2C registers definitions
91 { "pxa2xx-i2c", REGS_PXA2XX },
93 { "ce4100-i2c", REGS_CE4100 },
99 * I2C bit definitions
165 #define _IBMR(i2c) ((i2c)->reg_ibmr) argument
166 #define _IDBR(i2c) ((i2c)->reg_idbr) argument
[all …]
Di2c-nuc900.c2 * linux/drivers/i2c/busses/i2c-nuc900.c
6 …* This driver based on S3C2410 I2C driver of Ben Dooks <ben-Y5A6D6n0/KfQXOPxS62xeg@public.gmane.or…
18 #include <linux/i2c.h>
32 #include <mach/i2c.h>
34 /* nuc900 i2c registers offset */
43 /* nuc900 i2c CSR register bits */
52 /* nuc900 i2c CMDR register bits */
60 /* i2c controller state */
70 /* i2c controller private data */
97 static inline void nuc900_i2c_master_complete(struct nuc900_i2c *i2c, int ret) in nuc900_i2c_master_complete() argument
[all …]
Di2c-s3c2410.c1 /* linux/drivers/i2c/busses/i2c-s3c2410.c
6 * S3C2410 I2C Controller
26 #include <linux/i2c.h>
46 /* i2c controller state */
97 static inline int s3c24xx_i2c_is2440(struct s3c24xx_i2c *i2c) in s3c24xx_i2c_is2440() argument
99 struct platform_device *pdev = to_platform_device(i2c->dev); in s3c24xx_i2c_is2440()
103 if (i2c->dev->of_node) in s3c24xx_i2c_is2440()
104 return of_device_is_compatible(i2c->dev->of_node, in s3c24xx_i2c_is2440()
105 "samsung,s3c2440-i2c"); in s3c24xx_i2c_is2440()
118 static inline void s3c24xx_i2c_master_complete(struct s3c24xx_i2c *i2c, int ret) in s3c24xx_i2c_master_complete() argument
[all …]
DMakefile2 # Makefile for the i2c bus drivers.
6 obj-$(CONFIG_I2C_SCMI) += i2c-scmi.o
9 obj-$(CONFIG_I2C_ALI1535) += i2c-ali1535.o
10 obj-$(CONFIG_I2C_ALI1563) += i2c-ali1563.o
11 obj-$(CONFIG_I2C_ALI15X3) += i2c-ali15x3.o
12 obj-$(CONFIG_I2C_AMD756) += i2c-amd756.o
13 obj-$(CONFIG_I2C_AMD756_S4882) += i2c-amd756-s4882.o
14 obj-$(CONFIG_I2C_AMD8111) += i2c-amd8111.o
15 obj-$(CONFIG_I2C_I801) += i2c-i801.o
16 obj-$(CONFIG_I2C_ISCH) += i2c-isch.o
[all …]
Di2c-xiic.c2 * i2c-xiic.c
37 #include <linux/i2c.h>
40 #include <linux/i2c-xiic.h>
44 #define DRIVER_NAME "xiic-i2c"
53 * struct xiic_i2c - Internal representation of the XIIC I2C bus
170 #define xiic_tx_space(i2c) ((i2c)->tx_msg->len - (i2c)->tx_pos) argument
171 #define xiic_rx_space(i2c) ((i2c)->rx_msg->len - (i2c)->rx_pos) argument
173 static void xiic_start_xfer(struct xiic_i2c *i2c);
174 static void __xiic_start_xfer(struct xiic_i2c *i2c);
176 static inline void xiic_setreg8(struct xiic_i2c *i2c, int reg, u8 value) in xiic_setreg8() argument
[all …]
Di2c-pca-platform.c4 * Platform driver for the PCA9564 I2C controller.
20 #include <linux/i2c.h>
23 #include <linux/i2c-algo-pca.h>
24 #include <linux/i2c-pca-platform.h>
45 struct i2c_pca_pf_data *i2c = pd; in i2c_pca_pf_readbyte8() local
46 return ioread8(i2c->reg_base + reg); in i2c_pca_pf_readbyte8()
51 struct i2c_pca_pf_data *i2c = pd; in i2c_pca_pf_readbyte16() local
52 return ioread8(i2c->reg_base + reg * 2); in i2c_pca_pf_readbyte16()
57 struct i2c_pca_pf_data *i2c = pd; in i2c_pca_pf_readbyte32() local
58 return ioread8(i2c->reg_base + reg * 4); in i2c_pca_pf_readbyte32()
[all …]
Di2c-ocores.c2 * i2c-ocores.c: I2C bus driver for OpenCores I2C controller
3 * (http://www.opencores.org/projects.cgi/web/i2c/overview).
16 * - compatible : "opencores,i2c-ocores"
25 * compatible = "opencores,i2c-ocores";
32 * -- Devices connected on this I2C bus get
52 #include <linux/i2c.h>
55 #include <linux/i2c-ocores.h>
102 static inline void oc_setreg(struct ocores_i2c *i2c, int reg, u8 value) in oc_setreg() argument
104 iowrite8(value, i2c->base + reg * i2c->regstep); in oc_setreg()
107 static inline u8 oc_getreg(struct ocores_i2c *i2c, int reg) in oc_getreg() argument
[all …]
Di2c-octeon.c7 * This is a driver for the i2c adapter in Cavium Networks' OCTEON processors.
21 #include <linux/i2c.h>
28 #define DRV_NAME "i2c-octeon"
77 * octeon_i2c_write_sw - write an I2C core register.
78 * @i2c: The struct octeon_i2c.
82 * The I2C core registers are accessed indirectly via the SW_TWSI CSR.
84 static void octeon_i2c_write_sw(struct octeon_i2c *i2c, in octeon_i2c_write_sw() argument
90 __raw_writeq(SW_TWSI_V | eop_reg | data, i2c->twsi_base + SW_TWSI); in octeon_i2c_write_sw()
92 tmp = __raw_readq(i2c->twsi_base + SW_TWSI); in octeon_i2c_write_sw()
97 * octeon_i2c_read_sw - write an I2C core register.
[all …]
DKconfig5 menu "I2C Hardware Bus support"
20 will be called i2c-ali1535.
32 will be called i2c-ali1563.
39 Acer Labs Inc. (ALI) M1514 and M1543 motherboard I2C interfaces.
42 will be called i2c-ali15x3.
49 756/766/768 mainboard I2C interfaces. The driver also includes
50 support for the first (SMBus 1.0) I2C interface of the AMD 8111 and
51 the nVidia nForce I2C interface.
54 will be called i2c-amd756.
67 will be called i2c-amd756-s4882.
[all …]
Di2c-mpc.c5 * This is a combined i2c adapter and algorithm driver for the
7 * the same I2C unit (8240, 8245, 85xx).
26 #include <linux/i2c.h>
33 #define DRV_NAME "mpc-i2c"
75 void (*setup)(struct device_node *node, struct mpc_i2c *i2c,
80 static inline void writeccr(struct mpc_i2c *i2c, u32 x) in writeccr() argument
82 writeb(x, i2c->base + MPC_I2C_CR); in writeccr()
87 struct mpc_i2c *i2c = dev_id; in mpc_i2c_isr() local
88 if (readb(i2c->base + MPC_I2C_SR) & CSR_MIF) { in mpc_i2c_isr()
90 i2c->interrupt = readb(i2c->base + MPC_I2C_SR); in mpc_i2c_isr()
[all …]
Di2c-intel-mid.c2 * Support for Moorestown/Medfield I2C chip
28 #include <linux/i2c.h>
35 #define DRIVER_NAME "i2c-intel-mid"
59 * @adap: core i2c layer adapter information
73 * i2c layer objects and the data we need to track privately.
109 #define IC_TAR_SPECIAL (1 << 11) /* Perform special I2C cmd */
273 #define IC_EN (1 << 0) /* I2C in an enabled state */
304 MODULE_PARM_DESC(speed_mode, "Set the speed of the i2c interface (0-2)");
307 * intel_mid_i2c_disable - Disable I2C controller
313 * -ETIMEDOUT if i2c cannot be disabled within the given time
[all …]
Di2c-versatile.c2 * i2c-versatile.c
13 #include <linux/i2c.h>
14 #include <linux/i2c-algo-bit.h>
34 struct i2c_versatile *i2c = data; in i2c_versatile_setsda() local
36 writel(SDA, i2c->base + (state ? I2C_CONTROLS : I2C_CONTROLC)); in i2c_versatile_setsda()
41 struct i2c_versatile *i2c = data; in i2c_versatile_setscl() local
43 writel(SCL, i2c->base + (state ? I2C_CONTROLS : I2C_CONTROLC)); in i2c_versatile_setscl()
48 struct i2c_versatile *i2c = data; in i2c_versatile_getsda() local
49 return !!(readl(i2c->base + I2C_CONTROL) & SDA); in i2c_versatile_getsda()
54 struct i2c_versatile *i2c = data; in i2c_versatile_getscl() local
[all …]
Di2c-mxs.c2 * Freescale MXS I2C bus driver
22 #include <linux/i2c.h>
32 #define DRIVER_NAME "mxs-i2c"
98 * struct mxs_i2c_dev - per device, private MXS-I2C data
104 * @adapter: i2c subsystem adapter node
116 * mxs_reset_block and the mach-dependency. Needs an I2C analyzer, probably.
118 static void mxs_i2c_reset(struct mxs_i2c_dev *i2c) in mxs_i2c_reset() argument
120 mxs_reset_block(i2c->regs); in mxs_i2c_reset()
121 writel(MXS_I2C_IRQ_MASK << 8, i2c->regs + MXS_I2C_CTRL1_SET); in mxs_i2c_reset()
123 i2c->regs + MXS_I2C_QUEUECTRL_SET); in mxs_i2c_reset()
[all …]
/linux-3.3/sound/soc/codecs/
DKconfig1 # Helper to resolve issues with configs that have SPI enabled but I2C
2 # modular, meaning we can't build the codec driver in with I2C support.
7 default m if I2C=m
8 default y if I2C=y
20 select SND_SOC_ADAU1373 if I2C
24 select SND_SOC_AK4535 if I2C
25 select SND_SOC_AK4641 if I2C
26 select SND_SOC_AK4642 if I2C
27 select SND_SOC_AK4671 if I2C
28 select SND_SOC_ALC5623 if I2C
[all …]
Dwm2000.c31 #include <linux/i2c.h>
54 struct i2c_client *i2c; member
70 static int wm2000_write(struct i2c_client *i2c, unsigned int reg, in wm2000_write() argument
73 struct wm2000_priv *wm2000 = i2c_get_clientdata(i2c); in wm2000_write()
77 static unsigned int wm2000_read(struct i2c_client *i2c, unsigned int r) in wm2000_read() argument
79 struct wm2000_priv *wm2000 = i2c_get_clientdata(i2c); in wm2000_read()
92 struct i2c_client *i2c = wm2000->i2c; in wm2000_reset() local
94 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_ANC_ENG_CLR); in wm2000_reset()
95 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_RAM_CLR); in wm2000_reset()
96 wm2000_write(i2c, WM2000_REG_ID1, 0); in wm2000_reset()
[all …]
/linux-3.3/drivers/i2c/
DKconfig2 # I2C subsystem configuration
5 menuconfig I2C config
6 tristate "I2C support"
10 I2C (pronounce: I-squared-C) is a slow serial bus protocol used in
12 or System Management Bus is a subset of the I2C protocol. More
13 information is contained in the directory <file:Documentation/i2c/>,
16 Both I2C and SMBus are supported here. You will need this for
19 If you want I2C support, you should say Y here and also to the
22 This I2C support can also be built as a module. If so, the module
23 will be called i2c-core.
[all …]
/linux-3.3/drivers/mfd/
D88pm860x-i2c.c2 * I2C driver for Marvell 88PM860x
14 #include <linux/i2c.h>
20 int pm860x_reg_read(struct i2c_client *i2c, int reg) in pm860x_reg_read() argument
22 struct pm860x_chip *chip = i2c_get_clientdata(i2c); in pm860x_reg_read()
23 struct regmap *map = (i2c == chip->client) ? chip->regmap in pm860x_reg_read()
36 int pm860x_reg_write(struct i2c_client *i2c, int reg, in pm860x_reg_write() argument
39 struct pm860x_chip *chip = i2c_get_clientdata(i2c); in pm860x_reg_write()
40 struct regmap *map = (i2c == chip->client) ? chip->regmap in pm860x_reg_write()
49 int pm860x_bulk_read(struct i2c_client *i2c, int reg, in pm860x_bulk_read() argument
52 struct pm860x_chip *chip = i2c_get_clientdata(i2c); in pm860x_bulk_read()
[all …]
Dmax8997.c25 #include <linux/i2c.h>
50 int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest) in max8997_read_reg() argument
52 struct max8997_dev *max8997 = i2c_get_clientdata(i2c); in max8997_read_reg()
56 ret = i2c_smbus_read_byte_data(i2c, reg); in max8997_read_reg()
67 int max8997_bulk_read(struct i2c_client *i2c, u8 reg, int count, u8 *buf) in max8997_bulk_read() argument
69 struct max8997_dev *max8997 = i2c_get_clientdata(i2c); in max8997_bulk_read()
73 ret = i2c_smbus_read_i2c_block_data(i2c, reg, count, buf); in max8997_bulk_read()
82 int max8997_write_reg(struct i2c_client *i2c, u8 reg, u8 value) in max8997_write_reg() argument
84 struct max8997_dev *max8997 = i2c_get_clientdata(i2c); in max8997_write_reg()
88 ret = i2c_smbus_write_byte_data(i2c, reg, value); in max8997_write_reg()
[all …]
/linux-3.3/drivers/media/dvb/frontends/
DKconfig23 depends on DVB_CORE && I2C
31 depends on DVB_CORE && I2C
39 depends on DVB_CORE && I2C
47 depends on DVB_CORE && I2C
57 depends on DVB_CORE && I2C
66 depends on DVB_CORE && I2C
78 depends on DVB_CORE && I2C
85 depends on DVB_CORE && I2C
92 depends on DVB_CORE && I2C
99 depends on DVB_CORE && I2C
[all …]
/linux-3.3/Documentation/i2c/
Dinstantiating-devices1 How to instantiate I2C devices
4 Unlike PCI or USB devices, I2C devices are not enumerated at the hardware
6 I2C bus segment, and what address these devices are using. For this
7 reason, the kernel code must instantiate I2C devices explicitly. There are
11 Method 1: Declare the I2C devices by bus number
14 This method is appropriate when the I2C bus is a system bus as is the case
15 for many embedded systems. On such systems, each I2C bus has a number
16 which is known in advance. It is thus possible to pre-declare the I2C
45 The above code declares 3 devices on I2C bus 1, including their respective
46 addresses and custom data needed by their drivers. When the I2C bus in
[all …]
Ddev-interface1 Usually, i2c devices are controlled by a kernel driver. But it is also
3 the /dev interface. You need to load module i2c-dev for this.
5 Each registered i2c adapter gets a number, counting from 0. You can
6 examine /sys/class/i2c-dev/ to see what number corresponds to which adapter.
8 i2c adapters present on your system at a given time. i2cdetect is part of
9 the i2c-tools package.
11 I2C device files are character device files with major device number 89
13 explained above. They should be called "i2c-%d" (i2c-0, i2c-1, ...,
14 i2c-10, ...). All 256 minor device numbers are reserved for i2c.
20 So let's say you want to access an i2c adapter from a C program. The
[all …]
/linux-3.3/drivers/video/aty/
Dradeon_i2c.c9 #include <linux/i2c.h>
10 #include <linux/i2c-algo-bit.h>
93 dev_dbg(&chan->rinfo->pdev->dev, "I2C bus %s registered.\n", name); in radeon_setup_i2c_bus()
95 dev_warn(&chan->rinfo->pdev->dev, "Failed to register I2C bus %s.\n", name); in radeon_setup_i2c_bus()
101 rinfo->i2c[0].rinfo = rinfo; in radeon_create_i2c_busses()
102 rinfo->i2c[0].ddc_reg = GPIO_MONID; in radeon_create_i2c_busses()
104 rinfo->i2c[0].adapter.class = I2C_CLASS_HWMON; in radeon_create_i2c_busses()
106 radeon_setup_i2c_bus(&rinfo->i2c[0], "monid"); in radeon_create_i2c_busses()
108 rinfo->i2c[1].rinfo = rinfo; in radeon_create_i2c_busses()
109 rinfo->i2c[1].ddc_reg = GPIO_DVI_DDC; in radeon_create_i2c_busses()
[all …]
/linux-3.3/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/
Di2c.txt1 * I2C
3 The I2C controller is expressed as a bus under the CPM node.
6 - compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c"
7 - reg : On CPM2 devices, the second resource doesn't specify the I2C
10 - #address-cells : Should be one. The cell is the i2c device address with
13 - clock-frequency : Can be used to set the i2c clock frequency. If
16 i2c drivers to find the bus to probe:
17 - linux,i2c-index : Can be used to hard code an i2c bus number. By default,
18 the bus number is dynamically assigned by the i2c core.
19 - linux,i2c-class : Can be used to override the i2c class. The class is used
[all …]
/linux-3.3/drivers/gpu/drm/radeon/
Dradeon_i2c.c78 /* bit banging i2c */
82 struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); in pre_xfer() local
83 struct radeon_device *rdev = i2c->dev->dev_private; in pre_xfer()
84 struct radeon_i2c_bus_rec *rec = &i2c->rec; in pre_xfer()
87 /* RV410 appears to have a bug where the hw i2c in reset in pre_xfer()
88 * holds the i2c port in a bad state - switch hw i2c away before in pre_xfer()
150 struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); in post_xfer() local
151 struct radeon_device *rdev = i2c->dev->dev_private; in post_xfer()
152 struct radeon_i2c_bus_rec *rec = &i2c->rec; in post_xfer()
167 struct radeon_i2c_chan *i2c = i2c_priv; in get_clock() local
[all …]
/linux-3.3/Documentation/devicetree/bindings/i2c/
Dfsl-imx-i2c.txt1 * Freescale Inter IC (I2C) and High Speed Inter IC (HS-I2C) for i.MX
4 - compatible : Should be "fsl,<chip>-i2c"
5 - reg : Should contain I2C/HS-I2C registers location and length
6 - interrupts : Should contain I2C/HS-I2C interrupt
9 - clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz.
14 i2c@83fc4000 { /* I2C2 on i.MX51 */
15 compatible = "fsl,imx51-i2c", "fsl,imx1-i2c";
20 i2c@70038000 { /* HS-I2C on i.MX51 */
21 compatible = "fsl,imx51-i2c", "fsl,imx1-i2c";

12345678910>>...104