[PATCH v1] i2c: geni: reset controller on NACK to recover from invalid bus state
Heiko Schocher
hs at nabladev.com
Wed Jun 10 12:24:07 CEST 2026
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 <aswin.murugan at oss.qualcomm.com>
> ---
> drivers/i2c/geni_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Heiko Schocher <hs at nabladev.com>
bye,
Heiko
--
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office at nabladev.com
Geschäftsführer : Stefano Babic
More information about the U-Boot
mailing list