Re: [PATCH v5 0/6] i2c: designware: Improve support of multi-messages transfer
From: Mika Westerberg
Date: Tue Jan 20 2026 - 05:01:34 EST
On Tue, Jan 20, 2026 at 10:28:00AM +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() in two functions. The core logic handling
> the transaction is now in __i2c_dw_xfer_one_part(), while i2c_dw_xfer()
> 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.
>
> This patch series also brings four cleanups:
> * Optimize the read of the message flags in i2c_dw_read().
> * Sort the compatible strings alphabetically in dw_i2c_of_match[].
> * Simplify runtime PM handling in i2c_dw_xfer() with guard.
> * Add a dedicated i2c_algorithm for AMD NAVI controller.
>
> Signed-off-by: Benoît Monin <benoit.monin@xxxxxxxxxxx>
> ---
> Changes in v5:
> - Rebased on v6.19-rc6 and fully retested on EyeQ6Lplus.
> - Drop dt-binding patch: already merged upstream in v6.19-rc2.
> - From Andi Shyti's review:
> - __i2c_dw_xfer_one_part() now returns 0 on success instead
> of the number of messages transferred.
> - Drop inline keyword from i2c_dw_msg_is_valid() declaration.
> - Link to v4: https://lore.kernel.org/r/20251126-i2c-dw-v4-0-b0654598e7c5@xxxxxxxxxxx
Why you dropped my ack?