[PATCH RFC v3 11/14] i2c: nomadik: save I2C_CR register before resetting HW in IRQ handler

Linus Walleij linusw at kernel.org
Fri Nov 6 05:25:36 PST 2026


On Thu, Nov 5, 2026 at 6:16 PM Dmitry Guzman <Dmitry.Guzman at mobileye.com> wrote:

> On some interrupts, such as Bus Error interrupt or Arbitration Lost
> interrupt, the interrupt handler calls init_hw() to reset the I2C
> controller. This clears I2C_SR register value that might be used for
> fault reporting.
>
> Add i2c_sr field to nmk_i2c_dev structure, store there I2C_SR register
> value before resetting the hardware, and use this value instead of
> reading it directly in nmk_i2c_xfer_one() if it was read in IRQ handler.
>
> Signed-off-by: Dmitry Guzman <Dmitry.Guzman at mobileye.com>

Reviewed-by: Linus Walleij <linusw at kernel.org>

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list