summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorClaudio Foellmi <claudio.foellmi@ergon.ch>2017-10-04 11:43:45 +0200
committerWolfram Sang <wsa@the-dreams.de>2017-10-30 15:18:31 +0100
commit93367bfca98f36cece57c01dbce6ea1b4ac58245 (patch)
tree3752c6741d03204705ee9764649af1a9b10668ad /drivers/gpio/gpiolib.c
parent1f35b8653687b9c08c8d58489c1b5cb9cf961c17 (diff)
downloadtalos-obmc-linux-93367bfca98f36cece57c01dbce6ea1b4ac58245.tar.gz
talos-obmc-linux-93367bfca98f36cece57c01dbce6ea1b4ac58245.zip
i2c: omap: Trigger bus recovery in lockup case
A very conservative check for bus activity (to prevent interference in multimaster setups) prevented the bus recovery methods from being triggered in the case that SDA or SCL was stuck low. This defeats the purpose of the recovery mechanism, which was introduced for exactly this situation (a slave device keeping SDA pulled down). Also added a check to make sure SDA is low before attempting recovery. If SDA is not stuck low, recovery will not help, so we can skip it. Note that bus lockups can persist across reboots. The only other options are to reset or power cycle the offending slave device, and many i2c slaves do not even have a reset pin. If we see that one of the lines is low for the entire timeout duration, we can actually be sure that there is no other master driving the bus. It is therefore save for us to attempt a bus recovery. Signed-off-by: Claudio Foellmi <claudio.foellmi@ergon.ch> Tested-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> [wsa: fixed one return code to -EBUSY] Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud