Re: [PATCH v2 7/9] i2c: designware: Move interrupt handling functions before i2c_dw_xfer()

Andy Shevchenko
2024-02-06T15:18:17Z

On Tue, Feb 06, 2024 at 04:51:56PM +0200, Jarkko Nikula wrote:
> Code is more logically arranged when i2c_dw_read_clear_intrbits() and
> i2c_dw_isr() are located before i2c_dw_xfer().
>
> Real reason for this is to prepare for more shared code between
> interrupt and polling mode code.

...

> + /*
> + * We must disable the adapter before returning and signaling the end
> + * of the current transfer. Otherwise the hardware might continue
> + * generating interrupts which in turn causes a race condition with
> + * the following transfer. Needs some more investigation if the

While at it, you may make it consistent, i.e. by dropping an extra space.

> + * additional interrupts are a hardware bug or this driver doesn't
> + * handle them correctly yet.
> + */

--
With Best Regards,
Andy Shevchenko