Hello Aswin,
On 02.06.26 08:43, Aswin Murugan wrote:
During i2c probe, repeated accesses to non-existent slave addresses
generate consecutive NACK responses. On GENI I2C controllers, these
back-to-back error conditions leaves the controller in an invalid
or busy state, especially at lower bus frequencies (100 kHz and
400 kHz). As a result, subsequent transfers fails and valid slave
addresses are not detected.
Currently, controller recovery is triggered only on timeout errors.
However, NACK conditions (-EREMOTEIO) can lead to the same stale bus
state.
Handle -EREMOTEIO similar to -ETIMEDOUT by issuing a command abort
before starting the next transfer. This ensures the controller state
machine is reset and the bus is returned to a known good state.
This improves reliability of i2c probe and allows correct detection
of slave devices under repeated probing conditions.
Signed-off-by: Aswin Murugan <[email protected]>
---
drivers/i2c/geni_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Heiko Schocher <[email protected]>
bye,
Heiko
--
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: [email protected]
Geschäftsführer : Stefano Babic