public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Benoît Monin" <benoit.monin@bootlin.com>
Cc: "Andi Shyti" <andi.shyti@kernel.org>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Jan Dabros" <jsd@semihalf.com>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Clark Williams" <clrkwllms@kernel.org>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Gregory CLEMENT" <gregory.clement@bootlin.com>,
	"Théo Lebrun" <theo.lebrun@bootlin.com>,
	"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
	"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
	"Dmitry Guzman" <dmitry.guzman@mobileye.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v6 0/3] i2c: designware: Improve support of multi-messages transfer
Date: Tue, 3 Feb 2026 14:01:56 +0200	[thread overview]
Message-ID: <aYHjtLckF01dOX48@smile.fi.intel.com> (raw)
In-Reply-To: <20260130-i2c-dw-v6-0-08ca1e9ece07@bootlin.com>

On Fri, Jan 30, 2026 at 04:52:28PM +0100, Benoît Monin wrote:
> Add support for the I2C_M_STOP flag to the .xfer() function of
> the designware driver. This allows grouping multiple accesses in a
> single call and changing the target address after a STOP flag. This is
> achieved by splitting i2c_dw_xfer_common() in two functions. The core
> logic handling the transaction is now in __i2c_dw_xfer_one_part(),
> while i2c_dw_xfer_common() loops over the messages to search for the
> I2C_M_STOP flag and calls __i2c_dw_xfer_one_part().
> 
> Handle controllers that lack the ability to emit a RESTART when two
> consecutive messages have the same address and direction by aborting
> transfers that contain such a sequence of messages. For those controllers,
> we also check that we do not get any unwanted STOP caused by a Tx FIFO
> underrun, as they lack the ability to hold the clock during a transaction.
> And we set the irq as non-threaded to prevent underrun on PREEMPT-RT
> kernel when filling the FIFO.
> 
> The I2C controllers found in the EyeQ6Lplus and EyeQ7H SoCs from Mobileye
> lack such capability, so a compatible string is added because this cannot
> be detected at runtime. The corresponding DT bindings has already been
> merged and is available in v6.19-rc2:
> 
>     d9b85d296f3a ("dt-bindings: i2c: dw: Add Mobileye I2C controllers")
> 
> This patch series also simplifies runtime PM handling in
> i2c_dw_xfer_common() and amd_i2c_dw_xfer_quirk() with PM_RUNTIME_* macros.
> 
> To test I2C_M_STOP and other message modifier flags, I posted a patch
> series for i2c-tools[1]. With it, i2cdetect shows the support of the
> protocol mangling and repeated start skipping functionalities, and
> i2ctransfer can set the modifier flags to the I2C messages.
> 
> The series is now based on i2c-host tree and only contains the last three
> patches that have not been merged yet. The first and last patches are
> functionally identical to the one posted in the previous revision. Only
> the second patch contains modified code to use PM_RUNTIME_* macros
> instead of ACQUIRE()/ACQUIRE_ERR(). Thus I let Mika's Acked-by on the
> first and third patch, and dropped it from the second patch. I hope it
> was the correct thing to do.

Looks good enough to me, and if anything, it may be fixed later on.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2026-02-03 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30 15:52 [PATCH v6 0/3] i2c: designware: Improve support of multi-messages transfer Benoît Monin
2026-01-30 15:52 ` [PATCH v6 1/3] i2c: designware: Implement I2C_M_STOP support Benoît Monin
2026-01-30 15:52 ` [PATCH v6 2/3] i2c: designware: Use runtime PM macro for auto-cleanup Benoît Monin
2026-01-30 15:52 ` [PATCH v6 3/3] i2c: designware: Support of controller with IC_EMPTYFIFO_HOLD_MASTER disabled Benoît Monin
2026-02-03 12:01 ` Andy Shevchenko [this message]
2026-02-04  1:24 ` [PATCH v6 0/3] i2c: designware: Improve support of multi-messages transfer 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=aYHjtLckF01dOX48@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andi.shyti@kernel.org \
    --cc=benoit.monin@bootlin.com \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=dmitry.guzman@mobileye.com \
    --cc=gregory.clement@bootlin.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rostedt@goodmis.org \
    --cc=tawfik.bayouk@mobileye.com \
    --cc=theo.lebrun@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vladimir.kondratiev@mobileye.com \
    /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