| /kernel/linux/linux-6.6/Documentation/i2c/ |
| D | i2c-sysfs.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 Linux I2C Sysfs 10 I2C topology can be complex because of the existence of I2C MUX 11 (I2C Multiplexer). The Linux 12 kernel abstracts the MUX channels into logical I2C bus numbers. However, there 13 is a gap of knowledge to map from the I2C bus physical number and MUX topology 14 to logical I2C bus number. This doc is aimed to fill in this gap, so the 16 the concept of logical I2C buses in the kernel, by knowing the physical I2C 17 topology and navigating through the I2C sysfs in Linux shell. This knowledge is 18 useful and essential to use ``i2c-tools`` for the purpose of development and [all …]
|
| /kernel/linux/linux-6.6/arch/arm/boot/dts/aspeed/ |
| D | ibm-power9-dual.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 7 #address-cells = <1>; 8 #size-cells = <1>; 9 chip-id = <0>; 16 i2c@1800 { 17 compatible = "ibm,fsi-i2c-master"; 19 #address-cells = <1>; 20 #size-cells = <0>; 22 cfam0_i2c0: i2c-bus@0 { 26 cfam0_i2c1: i2c-bus@1 { [all …]
|
| /kernel/linux/linux-5.10/arch/arm/boot/dts/ |
| D | ibm-power9-dual.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 7 #address-cells = <1>; 8 #size-cells = <1>; 9 chip-id = <0>; 16 i2c@1800 { 17 compatible = "ibm,fsi-i2c-master"; 19 #address-cells = <1>; 20 #size-cells = <0>; 22 cfam0_i2c0: i2c-bus@0 { 26 cfam0_i2c1: i2c-bus@1 { [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
| D | base.c | 26 #include "bus.h" 32 #include <subdev/bios/i2c.h> 35 nvkm_i2c_pad_find(struct nvkm_i2c *i2c, int id) in nvkm_i2c_pad_find() argument 39 list_for_each_entry(pad, &i2c->pad, head) { in nvkm_i2c_pad_find() 40 if (pad->id == id) in nvkm_i2c_pad_find() 48 nvkm_i2c_bus_find(struct nvkm_i2c *i2c, int id) in nvkm_i2c_bus_find() argument 50 struct nvkm_bios *bios = i2c->subdev.device->bios; in nvkm_i2c_bus_find() 51 struct nvkm_i2c_bus *bus; in nvkm_i2c_bus_find() local 55 u16 i2c = dcb_i2c_table(bios, &ver, &hdr, &cnt, &len); in nvkm_i2c_bus_find() local 56 if (i2c && ver >= 0x30) { in nvkm_i2c_bus_find() [all …]
|
| D | bus.c | 24 #include "bus.h" 30 * i2c-algo-bit 35 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_pre_xfer() local 36 return nvkm_i2c_bus_acquire(bus); in nvkm_i2c_bus_pre_xfer() 42 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_post_xfer() local 43 return nvkm_i2c_bus_release(bus); in nvkm_i2c_bus_post_xfer() 49 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setscl() local 50 bus->func->drive_scl(bus, state); in nvkm_i2c_bus_setscl() 56 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setsda() local 57 bus->func->drive_sda(bus, state); in nvkm_i2c_bus_setsda() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
| D | base.c | 26 #include "bus.h" 33 #include <subdev/bios/i2c.h> 36 nvkm_i2c_pad_find(struct nvkm_i2c *i2c, int id) in nvkm_i2c_pad_find() argument 40 list_for_each_entry(pad, &i2c->pad, head) { in nvkm_i2c_pad_find() 41 if (pad->id == id) in nvkm_i2c_pad_find() 49 nvkm_i2c_bus_find(struct nvkm_i2c *i2c, int id) in nvkm_i2c_bus_find() argument 51 struct nvkm_bios *bios = i2c->subdev.device->bios; in nvkm_i2c_bus_find() 52 struct nvkm_i2c_bus *bus; in nvkm_i2c_bus_find() local 56 u16 i2c = dcb_i2c_table(bios, &ver, &hdr, &cnt, &len); in nvkm_i2c_bus_find() local 57 if (i2c && ver >= 0x30) { in nvkm_i2c_bus_find() [all …]
|
| D | bus.c | 24 #include "bus.h" 30 * i2c-algo-bit 35 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_pre_xfer() local 36 return nvkm_i2c_bus_acquire(bus); in nvkm_i2c_bus_pre_xfer() 42 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_post_xfer() local 43 return nvkm_i2c_bus_release(bus); in nvkm_i2c_bus_post_xfer() 49 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setscl() local 50 bus->func->drive_scl(bus, state); in nvkm_i2c_bus_setscl() 56 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setsda() local 57 bus->func->drive_sda(bus, state); in nvkm_i2c_bus_setsda() [all …]
|
| /kernel/linux/linux-6.6/drivers/i2c/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 # I2C subsystem configuration 6 menu "I2C support" 8 config I2C config 9 tristate "I2C support" 13 I2C (pronounce: I-squared-C) is a slow serial bus protocol used in 15 or System Management Bus is a subset of the I2C protocol. More 16 information is contained in the directory <file:Documentation/i2c/>, 19 Both I2C and SMBus are supported here. You will need this for 22 If you want I2C support, you should say Y here and also to the [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/i2c/ |
| D | i2c.txt | 1 Generic device tree bindings for I2C busses 4 This document describes generic bindings which can be used to describe I2C 7 Required properties (per bus) 8 ----------------------------- 10 - #address-cells - should be <1>. Read more about addresses below. 11 - #size-cells - should be <0>. 12 - compatible - name of I2C bus controller 17 The cells properties above define that an address of children of an I2C bus 20 Optional properties (per bus) 21 ----------------------------- [all …]
|
| D | i2c-arb-gpio-challenge.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/i2c/i2c-arb-gpio-challenge.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO-based I2C Arbitration Using a Challenge & Response Mechanism 10 - Doug Anderson <dianders@chromium.org> 11 - Peter Rosin <peda@axentia.se> 15 the master of an I2C bus in a multimaster situation. 18 standard I2C multi-master rules. Using GPIOs is generally useful in the case 19 where there is a device on the bus that has errata and/or bugs that makes [all …]
|
| /kernel/linux/linux-5.10/drivers/i2c/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 # I2C subsystem configuration 6 menu "I2C support" 8 config I2C config 9 tristate "I2C support" 13 I2C (pronounce: I-squared-C) is a slow serial bus protocol used in 15 or System Management Bus is a subset of the I2C protocol. More 16 information is contained in the directory <file:Documentation/i2c/>, 19 Both I2C and SMBus are supported here. You will need this for 22 If you want I2C support, you should say Y here and also to the [all …]
|
| /kernel/linux/linux-6.6/drivers/base/regmap/ |
| D | regmap-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Register map access API - I2C support 10 #include <linux/i2c.h> 19 struct i2c_client *i2c = to_i2c_client(dev); in regmap_smbus_byte_reg_read() local 23 return -EINVAL; in regmap_smbus_byte_reg_read() 25 ret = i2c_smbus_read_byte_data(i2c, reg); in regmap_smbus_byte_reg_read() 38 struct i2c_client *i2c = to_i2c_client(dev); in regmap_smbus_byte_reg_write() local 41 return -EINVAL; in regmap_smbus_byte_reg_write() 43 return i2c_smbus_write_byte_data(i2c, reg, val); in regmap_smbus_byte_reg_write() 55 struct i2c_client *i2c = to_i2c_client(dev); in regmap_smbus_word_reg_read() local [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/i2c/ |
| D | i2c.txt | 1 Generic device tree bindings for I2C busses 4 This document describes generic bindings which can be used to describe I2C 7 Required properties (per bus) 8 ----------------------------- 10 - #address-cells - should be <1>. Read more about addresses below. 11 - #size-cells - should be <0>. 12 - compatible - name of I2C bus controller 17 The cells properties above define that an address of children of an I2C bus 20 Optional properties (per bus) 21 ----------------------------- [all …]
|
| D | i2c-mux-pinctrl.txt | 1 Pinctrl-based I2C Bus Mux 3 This binding describes an I2C bus multiplexer that uses pin multiplexing to 4 route the I2C signals, and represents the pin multiplexing configuration 7 +-----+ +-----+ 9 +------------------------+ +-----+ +-----+ 11 | /----|------+--------+ 12 | +---+ +------+ | child bus A, on first set of pins 13 | |I2C|---|Pinmux| | 14 | +---+ +------+ | child bus B, on second set of pins 15 | \----|------+--------+--------+ [all …]
|
| D | i2c-mux-gpmux.txt | 1 General Purpose I2C Bus Mux 3 This binding describes an I2C bus multiplexer that uses a mux controller 4 from the mux subsystem to route the I2C signals. 6 .-----. .-----. 8 .------------. '-----' '-----' 10 | | .--------+--------' 11 | .------. | .------+ child bus A, on MUX value set to 0 12 | | I2C |-|--| Mux | 13 | '------' | '--+---+ child bus B, on MUX value set to 1 14 | .------. | | '----------+--------+--------. [all …]
|
| D | i2c-arb-gpio-challenge.txt | 1 GPIO-based I2C Arbitration Using a Challenge & Response Mechanism 4 the master of an I2C bus in a multimaster situation. 7 the standard I2C multi-master rules. Using GPIOs is generally useful in 8 the case where there is a device on the bus that has errata and/or bugs 12 * It is nonstandard (not using standard I2C multimaster) 13 * Having two masters on a bus in general makes it relatively hard to debug 14 problems (hard to tell if i2c issues were caused by one master, another, or 15 some device on the bus). 20 All masters on the bus have a 'bus claim' line which is an output that the 21 others can see. These are all active low with pull-ups enabled. We'll [all …]
|
| /kernel/linux/linux-6.6/drivers/i2c/busses/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 6 menu "I2C Hardware Bus support" 16 for Cypress CCGx Type-C controller. Individual bus drivers 25 controller is part of the 7101 device, which is an ACPI-compliant 29 will be called i2c-ali1535. 37 controller is part of the 7101 device, which is an ACPI-compliant 41 will be called i2c-ali1563. 48 Acer Labs Inc. (ALI) M1514 and M1543 motherboard I2C interfaces. 51 will be called i2c-ali15x3. 58 756/766/768 mainboard I2C interfaces. The driver also includes [all …]
|
| /kernel/linux/linux-5.10/include/linux/i3c/ |
| D | master.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 #include <linux/i2c.h> 31 * struct i3c_i2c_dev_desc - Common part of the I3C/I2C device descriptor 32 * @node: node element used to insert the slot into the I2C or I3C device 35 * I2C/I3C transfers 39 * This structure is describing common I3C/I2C dev information. 54 * struct i2c_dev_boardinfo - I2C device board information 55 * @node: used to insert the boardinfo object in the I2C boardinfo list 56 * @base: regular I2C board information 58 * the I2C device limitations [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/rtc/ |
| D | trivial-rtc.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/rtc/trivial-rtc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Alexandre Belloni <alexandre.belloni@bootlin.com> 18 - $ref: rtc.yaml# 23 # AB-RTCMC-32.768kHz-B5ZE-S3: Real Time Clock/Calendar Module with I2C Interface 24 - abracon,abb5zes3 25 # AB-RTCMC-32.768kHz-EOZ9: Real Time Clock/Calendar Module with I2C Interface 26 - abracon,abeoz9 [all …]
|
| /kernel/linux/linux-5.10/Documentation/i2c/ |
| D | instantiating-devices.rst | 2 How to instantiate I2C devices 5 Unlike PCI or USB devices, I2C devices are not enumerated at the hardware 7 I2C bus segment, and what address these devices are using. For this 8 reason, the kernel code must instantiate I2C devices explicitly. There are 12 Method 1: Declare the I2C devices statically 13 -------------------------------------------- 15 This method is appropriate when the I2C bus is a system bus as is the case 16 for many embedded systems. On such systems, each I2C bus has a number which 17 is known in advance. It is thus possible to pre-declare the I2C devices 18 which live on this bus. [all …]
|
| /kernel/linux/linux-5.10/drivers/i2c/busses/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 6 menu "I2C Hardware Bus support" 18 controller is part of the 7101 device, which is an ACPI-compliant 22 will be called i2c-ali1535. 30 controller is part of the 7101 device, which is an ACPI-compliant 34 will be called i2c-ali1563. 41 Acer Labs Inc. (ALI) M1514 and M1543 motherboard I2C interfaces. 44 will be called i2c-ali15x3. 51 756/766/768 mainboard I2C interfaces. The driver also includes 52 support for the first (SMBus 1.0) I2C interface of the AMD 8111 and [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/rtc/ |
| D | trivial-rtc.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/rtc/trivial-rtc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Alexandre Belloni <alexandre.belloni@bootlin.com> 18 - $ref: "rtc.yaml#" 23 # AB-RTCMC-32.768kHz-B5ZE-S3: Real Time Clock/Calendar Module with I2C Interface 24 - abracon,abb5zes3 25 # AB-RTCMC-32.768kHz-EOZ9: Real Time Clock/Calendar Module with I2C Interface 26 - abracon,abeoz9 [all …]
|
| /kernel/linux/linux-6.6/include/linux/i3c/ |
| D | master.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 #include <linux/i2c.h> 32 * struct i3c_i2c_dev_desc - Common part of the I3C/I2C device descriptor 33 * @node: node element used to insert the slot into the I2C or I3C device 36 * I2C/I3C transfers 40 * This structure is describing common I3C/I2C dev information. 55 * struct i2c_dev_boardinfo - I2C device board information 56 * @node: used to insert the boardinfo object in the I2C boardinfo list 57 * @base: regular I2C board information 59 * the I2C device limitations [all …]
|
| /kernel/linux/linux-5.10/Documentation/driver-api/ |
| D | i2c.rst | 4 I\ :sup:`2`\ C (or without fancy typography, "I2C") is an acronym for 5 the "Inter-IC" bus, a simple bus protocol which is widely used where low 7 some vendors use another name (such as "Two-Wire Interface", TWI) for 8 the same bus. I2C only needs two signals (SCL for clock, SDA for data), 10 I2C devices use seven bit addresses, and bus speeds of up to 400 kHz; 12 I2C is a multi-master bus; open drain signaling is used to arbitrate 16 The Linux I2C programming interfaces support the master side of bus 18 structured around two kinds of driver, and two kinds of device. An I2C 22 I2C bus segment it manages. On each I2C bus segment will be I2C devices 26 are functions to perform various I2C protocol operations; at this writing [all …]
|
| /kernel/linux/linux-6.6/Documentation/driver-api/ |
| D | i2c.rst | 4 I\ :sup:`2`\ C (or without fancy typography, "I2C") is an acronym for 5 the "Inter-IC" bus, a simple bus protocol which is widely used where low 7 some vendors use another name (such as "Two-Wire Interface", TWI) for 8 the same bus. I2C only needs two signals (SCL for clock, SDA for data), 10 I2C devices use seven bit addresses, and bus speeds of up to 400 kHz; 12 I2C is a multi-master bus; open drain signaling is used to arbitrate 16 The Linux I2C programming interfaces support the master side of bus 18 structured around two kinds of driver, and two kinds of device. An I2C 22 I2C bus segment it manages. On each I2C bus segment will be I2C devices 26 are functions to perform various I2C protocol operations; at this writing [all …]
|