public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* i2c-designware: not possible to write to different i2c addresses in one transfer?
@ 2025-10-15 11:25 Hans Verkuil
  2025-10-15 11:51 ` Wolfram Sang
  2025-10-20 11:59 ` Mika Westerberg
  0 siblings, 2 replies; 11+ messages in thread
From: Hans Verkuil @ 2025-10-15 11:25 UTC (permalink / raw)
  To: linux-i2c
  Cc: Jarkko Nikula, Andy Shevchenko, Mika Westerberg, Jan Dabros,
	Andi Shyti

Hi,

I have this code in a driver (writing display EDID data into an EDID EEPROM):

        struct i2c_msg msg[] = {
                {
                        .addr = state->seg_client->addr,        // 0x30
                        .buf = &seg,
                        .len = 1,
                        .flags = 0,
                },
                {
                        .addr = state->data_client->addr,       // 0x50
                        .buf = data,
                        .len = len,
                        .flags = 0,
                },
        };

        err = i2c_transfer(state->dev_client->adapter, msg, ARRAY_SIZE(msg));

This worked fine for the Raspberry Pi 4B using the broadcom i2c driver, but for
the Raspberry Pi 5 using the designware driver it fails with -EINVAL and these
kernel messages:

[  272.284689] i2c_designware 1f00074000.i2c: i2c_dw_xfer_msg: invalid target address
[  272.305788] i2c_designware 1f00074000.i2c: controller active

Looking in i2c-designware-master.c it seems it cannot handle consecutive messages for
different addresses.

The i2c device I'm using is this one:

https://www.onsemi.com/pdf/datasheet/cat24c208-d.pdf

Is this a hardware limitation? Or is this a corner case that was never implemented?
Or just simply a bug?

Regards,

	Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-10-20 12:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-15 11:25 i2c-designware: not possible to write to different i2c addresses in one transfer? Hans Verkuil
2025-10-15 11:51 ` Wolfram Sang
2025-10-15 13:40   ` Andy Shevchenko
2025-10-18 18:17     ` Hans Verkuil
2025-10-18 19:21       ` Andy Shevchenko
2025-10-20  9:41       ` Hans Verkuil
2025-10-19 17:53     ` Wolfram Sang
2025-10-20  7:15       ` Hans Verkuil
2025-10-20 11:59 ` Mika Westerberg
2025-10-20 12:29   ` Hans Verkuil
2025-10-20 12:45     ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox