diff mbox

[RFT,2/2] i2c: algos: bit: make sure to send STOP

Message ID 20180614012714.5937-3-wsa+renesas@sang-engineering.com (mailing list archive)
State Under Review
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Wolfram Sang June 14, 2018, 1:27 a.m. UTC
If SCL was low but SDA high, we would simply raise SCL but not send a
STOP. To make sure we always send STOP initially, lower both lines

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
 drivers/i2c/algos/i2c-algo-bit.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox


diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index c76cf51975d0..344649847885 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -650,6 +650,8 @@  static int __i2c_bit_add_bus(struct i2c_adapter *adap,
 		adap->quirks = &i2c_bit_quirk_no_clk_stretch;
 	/* Bring bus to a known state. Looks like STOP if bus is not free yet */
+	scllo(bit_adap);
+	sdalo(bit_adap);