diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-01-09 14:58:57 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-01-16 00:04:30 +0100 |
commit | 72b08fcc15dc6a2d211880e4dc7cf5314e9ab750 (patch) | |
tree | f37c366272e599b0bbde4e5dac0625335802ad47 /drivers/i2c | |
parent | 8092178ffe67dbd1f987e2e308e871c774774a16 (diff) | |
download | linux-72b08fcc15dc6a2d211880e4dc7cf5314e9ab750.tar.bz2 |
i2c: ensure SDA is released in recovery if SDA is controllable
If we have a function to control SDA, we should ensure that SDA is not
held down by us. So, release the GPIO in this case.
Tested-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-core-base.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index a8b3fbe16fa0..54cef80990a1 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -169,6 +169,8 @@ int i2c_generic_scl_recovery(struct i2c_adapter *adap) bri->prepare_recovery(adap); bri->set_scl(adap, val); + if (bri->set_sda) + bri->set_sda(adap, 1); ndelay(RECOVERY_NDELAY); /* |