public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Carlos Song <carlos.song@nxp.com>
Cc: Francesco Dolcini <francesco@dolcini.it>,
	Aisheng Dong <aisheng.dong@nxp.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Emanuele Ghidoli <emanuele.ghidoli@toradex.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Francesco Dolcini <francesco.dolcini@toradex.com>
Subject: Re: [PATCH v1] i2c: lpi2c: implement master_xfer_atomic callback
Date: Fri, 11 Apr 2025 14:41:29 +0200	[thread overview]
Message-ID: <20250411124129.GA48732@francesco-nb> (raw)
In-Reply-To: <FRWPR04MB11150B555044300A70102DAF5E8B62@FRWPR04MB11150.eurprd04.prod.outlook.com>

Hello,

On Fri, Apr 11, 2025 at 11:55:31AM +0000, Carlos Song wrote:
> > On Wed, Mar 19, 2025 at 03:51:14PM +0100, Francesco Dolcini wrote:
> > > From: Emanuele Ghidoli <emanuele.ghidoli@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@toradex.com>
> > > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> > 
> > Any comment on this?
> Looks good. Thank you for your work!
> Do you test it at some board? How can we test simply?

It was tested on Toradex SMARC iMX95, there to power-off/reset the board
we have some I2C communication required [1].

[1] https://lore.kernel.org/all/20250407114947.41421-3-francesco@dolcini.it/

Francesco



  reply	other threads:[~2025-04-11 12:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 14:51 [PATCH v1] i2c: lpi2c: implement master_xfer_atomic callback Francesco Dolcini
2025-04-11 11:47 ` Francesco Dolcini
2025-04-11 11:55   ` Carlos Song
2025-04-11 12:41     ` Francesco Dolcini [this message]
2025-04-11 14:06     ` Emanuele Ghidoli
2025-05-05 23:01 ` Andi Shyti
2025-05-08  2:03   ` Carlos Song
2025-05-14 15:14 ` Andi Shyti
2025-05-14 15:51   ` Francesco Dolcini
2025-05-15 11:40     ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250411124129.GA48732@francesco-nb \
    --to=francesco@dolcini.it \
    --cc=aisheng.dong@nxp.com \
    --cc=andi.shyti@kernel.org \
    --cc=carlos.song@nxp.com \
    --cc=emanuele.ghidoli@toradex.com \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox