Previously the SDA line sometimes remained stuck low after timeouts
rendering the I2C bus unusable. Testing has shown that disabling and
reenabling the I2C peripheral after sending the stop condition seems to
unstick SDA reliably.
Disable and reenable the I2C controller on timeout after sending stop
condition to unstick SDA.
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
drivers/i2c/busses/i2c-rk3x.c | 10 ++++++++++
1 file changed, 10 insertions(+)
From: John Keeping <hidden> Date: 2021-11-18 18:36:01
On Thu, Aug 26, 2021 at 07:46:32PM +0200, Tobias Schramm wrote:
Previously the SDA line sometimes remained stuck low after timeouts
rendering the I2C bus unusable. Testing has shown that disabling and
reenabling the I2C peripheral after sending the stop condition seems to
unstick SDA reliably.
Disable and reenable the I2C controller on timeout after sending stop
condition to unstick SDA.
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
I haven't seen the issue described here, so I can't test whether this
fix works, but the explanation makes sense, so:
Reviewed-by: John Keeping <redacted>
From: Wolfram Sang <wsa@kernel.org> Date: 2021-11-29 11:32:56
On Thu, Aug 26, 2021 at 07:46:32PM +0200, Tobias Schramm wrote:
Previously the SDA line sometimes remained stuck low after timeouts
rendering the I2C bus unusable. Testing has shown that disabling and
reenabling the I2C peripheral after sending the stop condition seems to
unstick SDA reliably.
Disable and reenable the I2C controller on timeout after sending stop
condition to unstick SDA.
Does it also help to not send STOP? This looks a bit like a hack which
went into the driver somehow. The proper solution might be to remove the
STOP and add proper i2c_bus_recovery at the beginning of a transfer.