i2c: davinci: bus recovery procedure to clear the bus
authorPhilby John <pjohn@in.mvista.com>
Mon, 11 Jan 2010 17:09:44 +0000 (22:39 +0530)
committerKevin Hilman <khilman@deeprootsystems.com>
Thu, 5 Aug 2010 16:38:32 +0000 (09:38 -0700)
commit8574faf9a5ae71fdd84c6413779a9b076138eb9e
tree4369234894343b6ab53853930ca3b0a592cc3621
parent82c0de11b734c5acec13c0f6007466da81cd16d9
i2c: davinci: bus recovery procedure to clear the bus

Come out of i2c time out condition by following the
bus recovery procedure outlined in the i2c protocol v3 spec.
The kernel must be robust enough to gracefully recover
from i2c bus failure without having to reset the machine.
This is done by first NACKing the slave, pulsing the SCL
line 9 times and then sending the stop command.

This patch has been tested on a DM6446 and DM355

Signed-off-by: Philby John <pjohn@in.mvista.com>
Signed-off-by: Srinivasan, Nageswari <nageswari@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
drivers/i2c/busses/i2c-davinci.c