[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYHjtLckF01dOX48@smile.fi.intel.com>
Date: Tue, 3 Feb 2026 14:01:56 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Benoît Monin <benoit.monin@...tlin.com>
Cc: Andi Shyti <andi.shyti@...nel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Jan Dabros <jsd@...ihalf.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Clark Williams <clrkwllms@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Gregory CLEMENT <gregory.clement@...tlin.com>,
Théo Lebrun <theo.lebrun@...tlin.com>,
Tawfik Bayouk <tawfik.bayouk@...ileye.com>,
Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
Dmitry Guzman <dmitry.guzman@...ileye.com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH v6 0/3] i2c: designware: Improve support of
multi-messages transfer
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@...ux.intel.com>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists