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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
first.

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

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);
 	sclhi(bit_adap);
 	sdahi(bit_adap);
 
-- 
2.11.0




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux