Re: [PATCH 2/3] i2c: designware: Enable transfer with different target addresses

Benoît Monin
2025-10-22T08:36:44Z

On Monday, 20 October 2025 at 21:52:01 CEST, Wolfram Sang wrote:
>
> > For your particular case, that will not help reaching the other segments as
> > we wait for a STOP before changing the target address. So, it should not
> > fail but do a write to segment 0 in your eeprom.
>
> So, this patch replaces a repeated start with a stop + start
> combination? Please don't do this. It will give users a false impression
> that proper repeated start is supported. Honestly reporting that the HW
> does not support is the better option, so the user can decide what to do
> then.
>
This patch replaces a -EINVAL in the middle of the transfer by a
STOP-then-START, but you are right, the expectation is to have a single
STOP at the end of a combined transfer. I somehow overlooked that part.

Maybe I could add support for the I2C_M_STOP flag instead? Or does an
adapter has to support all the protocol mangling if flagged with
I2C_FUNC_PROTOCOL_MANGLING?

That would still allow to group multiple accesses to device that support a
STOP in a transaction when done via i2c_dev I2C_RDWR ioctl, in a single-master
configuration.

Best regards,
--
Benoît Monin, Bootlin
Embedded Linux and Kernel engineering