summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/algos/i2c-algo-bit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index 1147bddb8b2c..3df0efd69ae3 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -649,6 +649,11 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap,
if (bit_adap->getscl == NULL)
adap->quirks = &i2c_bit_quirk_no_clk_stretch;
+ /* Bring bus to a known state. Looks like STOP if bus is not free yet */
+ setscl(bit_adap, 1);
+ udelay(bit_adap->udelay);
+ setsda(bit_adap, 1);
+
ret = add_adapter(adap);
if (ret < 0)
return ret;