[PATCH v1] i2c: lpi2c: implement master_xfer_atomic callback

Carlos Song carlos.song at nxp.com
Fri Apr 11 04:55:31 PDT 2025



> -----Original Message-----
> From: Francesco Dolcini <francesco at dolcini.it>
> Sent: Friday, April 11, 2025 7:48 PM
> To: Aisheng Dong <aisheng.dong at nxp.com>; Andi Shyti
> <andi.shyti at kernel.org>; Shawn Guo <shawnguo at kernel.org>; Sascha Hauer
> <s.hauer at pengutronix.de>
> Cc: Francesco Dolcini <francesco at dolcini.it>; Pengutronix Kernel Team
> <kernel at pengutronix.de>; Fabio Estevam <festevam at gmail.com>; Emanuele
> Ghidoli <emanuele.ghidoli at toradex.com>; linux-i2c at vger.kernel.org;
> imx at lists.linux.dev; linux-arm-kernel at lists.infradead.org;
> linux-kernel at vger.kernel.org; Francesco Dolcini
> <francesco.dolcini at toradex.com>
> Subject: [EXT] Re: [PATCH v1] i2c: lpi2c: implement master_xfer_atomic callback
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> Hello,
> 
> On Wed, Mar 19, 2025 at 03:51:14PM +0100, Francesco Dolcini wrote:
> > From: Emanuele Ghidoli <emanuele.ghidoli at toradex.com>
> >
> > Rework the read and write code paths in the driver to support
> > operation in atomic contexts. To achieve this, the driver must not
> > rely on IRQs or perform any scheduling, e.g., via a sleep or schedule
> > routine. Even jiffies do not advance in atomic contexts, so timeouts
> > based on them are substituted with delays.
> >
> > Implement atomic, sleep-free, and IRQ-less operation. This increases
> > complexity but is necessary for atomic I2C transfers required by some
> > hardware configurations, e.g., to trigger reboots on an external PMIC chip.
> >
> > Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli at toradex.com>
> > Signed-off-by: Francesco Dolcini <francesco.dolcini at toradex.com>
> 
> Any comment on this?
> 
> Francesco

Hi,

Looks good. Thank you for your work!
Do you test it at some board? How can we test simply?

BR
Carlos





More information about the linux-arm-kernel mailing list