Re: [PATCH 1/4] i2c: riic: Abort the transfer on completion timeout
Geert Uytterhoeven <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAMuHMdW5QrWvA4cXYWgttMmk+RPUzc-khjaDfSNmUKcUiW_FfA@mail.gmail.com> |
Hi Claudiu, On Wed, 20 May 2026 at 15:21, Claudiu Beznea <[email protected]> wrote: > From: Claudiu Beznea <[email protected]> > > riic_xfer() configures a transfer and waits for the interrupt handler to > signal its completion. If the completion times out, the device may be > powered off through runtime PM. However, the transfer interrupt may still > fire after the timeout. > > To avoid cases where riic_xfer() powers off the device (via runtime PM) > while the interrupt handler is still running, disable and synchronize the > interrupts after the completion times out. > > Fixes: 310c18a41450 ("i2c: riic: add driver") > Cc: [email protected] > Signed-off-by: Claudiu Beznea <[email protected]> Thanks for your patch! > --- a/drivers/i2c/busses/i2c-riic.c > +++ b/drivers/i2c/busses/i2c-riic.c > @@ -112,6 +112,7 @@ struct riic_dev { > void __iomem *base; > u8 *buf; > struct i2c_msg *msg; > + int *irqs; Perhaps make this a zero-length array at the end of the structure, so this does not need to be allocated separately? > int bytes_left; > int err; > int is_last; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds