Revert "i2c: algo-bit: init the bus to a known state"
authorWolfram Sang <[email protected]>
Sat, 16 Jun 2018 13:37:56 +0000 (22:37 +0900)
committerWolfram Sang <[email protected]>
Fri, 29 Jun 2018 06:19:41 +0000 (08:19 +0200)
This reverts commit 3e5f06bed72fe72166a6778f630241a893f67799. As per
bugzilla #200045, this caused a regression. I don't really see a way to
fix it without having the hardware. So, revert the patch and I will fix
the issue I was seeing originally in the i2c-gpio driver itself. I
couldn't find new users of this algorithm since, so there should be no
one depending on the new behaviour.

Reported-by: Sergey Larin <[email protected]>
Fixes: 3e5f06bed72f ("i2c: algo-bit: init the bus to a known state")
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Tested-by: Sergey Larin <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Cc: [email protected]
drivers/i2c/algos/i2c-algo-bit.c

index 4a34f311e1ff4df2cd6cdfcff7ea1662c95a06eb..0c0eb16d710ff57d72f8a42210f7500b2fd0c458 100644 (file)
@@ -647,11 +647,6 @@ 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;