diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2015-04-02 12:42:51 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2015-08-24 14:32:13 +0200 |
commit | 001eb3e70bfe427cee113608992222b12953fa91 (patch) | |
tree | dc1e311634ebe8aaa2ddb9434c989dede076e092 /Documentation | |
parent | b6c01cfd52f1429517771afe8ef3429559ccdb3f (diff) |
i2c-imx: add gpio recovery functionality
If the I2C is disturbed by other signals sometimes the i2c-imx bus gets stuck
with SDA being low.
This adds a recovery function to the bus driver.
When e.g. a device driver detects a stuck bus
int i2c_recover_bus(struct i2c_adapter *adap)
can be called to try to recover the bus.
(cherry picked from commit 88731dc0e8b6ba244e097b412b302acf3b9cc889)
Conflicts:
arch/arm/boot/dts/imx6qdl-apalis.dtsi
drivers/i2c/busses/i2c-imx.c
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/i2c/i2c-imx.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt index 4a8513e44740..552929771ea5 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt @@ -26,3 +26,26 @@ i2c@70038000 { /* HS-I2C on i.MX51 */ interrupts = <64>; clock-frequency = <400000>; }; + +The driver can provide recovery functionality for cases were the bus gets +stack with SDA pulled low. +In order to enable this one has to specify an additional pinctrl property with +the name 'recovery' to mux GPIO functionality on SDA/SCA and a gpios +property with the GPIOs for SDA/SCL. +The lack of the gpios property disables the functionality. + +Examples: +&i2c3 { + clock-frequency = <100000>; + pinctrl-names = "default", "recovery"; + pinctrl-0 = <&pinctrl_i2c3_1>; + pinctrl-1 = <&pinctrl_i2c3_recovery_1>; + gpios = <&gpio3 18 0 /* sda */ + &gpio3 17 0 /* scl */ + >; + status = "disabled"; +}; + +When e.g. a device driver detects a stuck bus +int i2c_recover_bus(struct i2c_adapter *adap) +can be called to try to recover the bus. |