i2c: axxia: Add I2C driver for AXM55xx
Subsystems (2)
PATCH v3 1/1 i2c: axxia: Add I2C driver for AXM55xx
Add I2C bus driver for the controller found in the LSI Axxia family SoCs. The driver implements 10-bit addressing and SMBus transfer modes via emulation (including SMBus block data read).
---
Changelog
v3:
- class-based instantiation not used
- move driver to embedded section in Makefile
- add some missing newlines in log messages
v2:
- Document the len <= 255 limitation
- return IRQ_HANDLED on unexpected IRQs
- fixed a number of style issues
- handle zero-length messages
- use reinit_completion() where appropriate
- enable for COMPILE_TEST
.../devicetree/bindings/i2c/i2c-axxia.txt | 30 ++ drivers/i2c/busses/Kconfig | 11 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-axxia.c | 559 +++++++++++++++++++++ 4 files changed, 601 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-axxia.txt create mode 100644 drivers/i2c/busses/i2c-axxia.c
Documentation/devicetree/bindings/i2c/i2c-axxia.txt new file +30 -0
@@ -0,0 +1,30 @@ +LSI Axxia I2C + +Required properties : +- compatible : Must be "lsi,api2c" +- reg : Offset and length of the register set for the device +- interrupts : the interrupt specifier +- #address-cells : Must be <1>; +- #size-cells : Must be <0>; +- clock-names : Must contain "i2c". +- clocks: Must contain an entry for each name in clock-names. See the common + clock bindings. + +Optional properties : +- clock-frequency : Desired I2C bus clock frequency in Hz. If not specified, + the default 100 kHz frequency will be used. As only Normal and Fast modes + are supported, possible values are 100000 and 400000. + +Example : + +i2c at 02010084000 { + compatible = "lsi,api2c"; + device_type = "i2c"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x20 0x10084000 0x00 0x1000>; + interrupts = <0 19 4>; + clocks = <&clk_per>; + clock-names = "i2c"; + clock-frequency = <400000>; +};
drivers/i2c/busses/Kconfig +11 -0
@@ -77,6 +77,17 @@ config I2C_AMD8111 This driver can also be built as a module. If so, the module will be called i2c-amd8111. +config I2C_AXXIA + tristate "Axxia I2C controller" + depends on ARCH_AXXIA || COMPILE_TEST + default ARCH_AXXIA + help + Say yes if you want to support the I2C bus on Axxia platforms. + + Please note that this controller is limited to transfers of maximum + 255 bytes in length. Any attempt to to a larger transfer will return + an error. + config I2C_I801 tristate "Intel 82801 (ICH/PCH)" depends on PCI
drivers/i2c/busses/Makefile +1 -0
@@ -31,6 +31,7 @@ obj-$(CONFIG_I2C_POWERMAC) += i2c-powermac.o # Embedded system I2C/SMBus host controller drivers obj-$(CONFIG_I2C_AT91) += i2c-at91.o obj-$(CONFIG_I2C_AU1550) += i2c-au1550.o +obj-$(CONFIG_I2C_AXXIA) += i2c-axxia.o obj-$(CONFIG_I2C_BCM2835) += i2c-bcm2835.o obj-$(CONFIG_I2C_BLACKFIN_TWI) += i2c-bfin-twi.o obj-$(CONFIG_I2C_CADENCE) += i2c-cadence.o
drivers/i2c/busses/i2c-axxia.c new file +559 -0
559 lines not on this page · raw message
Signature · 1 line
1.9.1
Wolfram Sang
AppliedQuoted 5 lines · Anders Berg
Add I2C bus driver for the controller found in the LSI Axxia family SoCs. The driver implements 10-bit addressing and SMBus transfer modes via emulation (including SMBus block data read).
Signed-off-by Anders Berg <[email protected]>
Applied to for-next, thanks!
Quoted 8 lines · Wolfram Sang
Quoted 5 lines · Anders Berg
Add I2C bus driver for the controller found in the LSI Axxia family SoCs. The driver implements 10-bit addressing and SMBus transfer modes via emulation (including SMBus block data read).
Signed-off-by Anders Berg <[email protected]>Applied to for-next, thanks!
You missed to move the Kconfig part to embedded. Fixed that for you! Nonetheless, was a quite smooth driver submission, thanks.