Commit 1d4a1adb authored by Robert Hancock's avatar Robert Hancock Committed by Andi Shyti
Browse files

i2c: xiic: Try re-initialization on bus busy timeout



In the event that the I2C bus was powered down when the I2C controller
driver loads, or some spurious pulses occur on the I2C bus, it's
possible that the controller detects a spurious I2C "start" condition.
In this situation it may continue to report the bus is busy indefinitely
and block the controller from working.

The "single-master" DT flag can be specified to disable bus busy checks
entirely, but this may not be safe to use in situations where other I2C
masters may potentially exist.

In the event that the controller reports "bus busy" for too long when
starting a transaction, we can try reinitializing the controller to see
if the busy condition clears. This allows recovering from this scenario.

Fixes: e1d5b659 ("i2c: Add support for Xilinx XPS IIC Bus Interface")
Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
Cc: <stable@vger.kernel.org> # v2.6.34+
Reviewed-by: default avatarManikanta Guntupalli <manikanta.guntupalli@amd.com>
Acked-by: default avatarMichal Simek <michal.simek@amd.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
parent 521da1e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment