From: Dmitry Bazhenov Date: Wed, 21 Sep 2016 06:51:02 +0000 (+0200) Subject: i2c: octeon: Fix set SCL recovery function X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e7051556b63dac163a82db6e6f324196c0c81e5b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git i2c: octeon: Fix set SCL recovery function The set SCL recovery function unconditionally pulls the SCL line low. Only pull SCL line low according to val parameter. Signed-off-by: Dmitry Bazhenov Signed-off-by: Jan Glauber [Changed commit message] Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-octeon-core.c b/drivers/i2c/busses/i2c-octeon-core.c index f45ea5eef513..f322242cdbf8 100644 --- a/drivers/i2c/busses/i2c-octeon-core.c +++ b/drivers/i2c/busses/i2c-octeon-core.c @@ -767,7 +767,7 @@ static void octeon_i2c_set_scl(struct i2c_adapter *adap, int val) { struct octeon_i2c *i2c = i2c_get_adapdata(adap); - octeon_i2c_write_int(i2c, TWSI_INT_SCL_OVR); + octeon_i2c_write_int(i2c, val ? 0 : TWSI_INT_SCL_OVR); } static int octeon_i2c_get_sda(struct i2c_adapter *adap)