Patchwork [v2,2/2] 5200/mpc: improve i2c bus error recovery

login
register
mail settings
Submitter Albrecht Dreß
Date Feb. 17, 2010, 6:59 p.m.
Message ID <1266433158.2322.1@antares>
Download mbox | patch
Permalink /patch/45654/
State Accepted
Delegated to: Grant Likely
Headers show

Comments

Albrecht Dreß - Feb. 17, 2010, 6:59 p.m.
Make the I2C adapter timeout configurable through a Device Tree property
which gives the timeout in microseconds.

Change vs. v.1: use "fsl,timeout" as property name (Thanks, Grant)

Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de>

---
Grant Likely - Feb. 17, 2010, 8:10 p.m.
On Wed, Feb 17, 2010 at 11:59 AM, Albrecht Dreß <albrecht.dress@arcor.de> wrote:
> Make the I2C adapter timeout configurable through a Device Tree property
> which gives the timeout in microseconds.
>
> Change vs. v.1: use "fsl,timeout" as property name (Thanks, Grant)
>
> Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

>
> ---
>
> --- linux-2.6.32-orig/Documentation/powerpc/dts-bindings/fsl/i2c.txt
>  2009-12-03 04:51:21.000000000 +0100
> +++ linux-2.6.32/Documentation/powerpc/dts-bindings/fsl/i2c.txt 2010-02-17
> 14:18:01.000000000 +0100
> @@ -21,6 +21,7 @@ Recommended properties :
>  - fsl,preserve-clocking : boolean; if defined, the clock settings
>    from the bootloader are preserved (not touched).
>  - clock-frequency : desired I2C bus clock frequency in Hz.
> + - fsl,timeout : I2C bus timeout in microseconds.
>
>  Examples :
>
> @@ -44,5 +45,6 @@ Examples :
>                interrupts = <43 2>;
>                interrupt-parent = <&mpic>;
>                clock-frequency = <400000>;
> +               fsl,timeout = <10000>;
>        };
>
>

Patch

--- linux-2.6.32-orig/Documentation/powerpc/dts-bindings/fsl/i2c.txt	2009-12-03 04:51:21.000000000 +0100
+++ linux-2.6.32/Documentation/powerpc/dts-bindings/fsl/i2c.txt	2010-02-17 14:18:01.000000000 +0100
@@ -21,6 +21,7 @@  Recommended properties :
   - fsl,preserve-clocking : boolean; if defined, the clock settings
     from the bootloader are preserved (not touched).
   - clock-frequency : desired I2C bus clock frequency in Hz.
+ - fsl,timeout : I2C bus timeout in microseconds.

  Examples :

@@ -44,5 +45,6 @@  Examples :
  		interrupts = <43 2>;
  		interrupt-parent = <&mpic>;
  		clock-frequency = <400000>;
+		fsl,timeout = <10000>;
  	};