* [REGRESSION] i3c: dw: Duplicate I2C client registration
@ 2026-10-02 2:51 Kunihiko Hayashi
0 siblings, 0 replies; only message in thread
From: Kunihiko Hayashi @ 2026-10-02 2:51 UTC (permalink / raw)
To: Alexandre Belloni, Frank Li, Peter Yin; +Cc: linux-i3c, linux-kernel
Hi,
I found a regression due to commit f26ecaa0f0ab
("i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter").
If an I2C device is described as a child device of a DesignWare I3C
controller, the I2C client will be double instantiated after this commit.
The sequence appears to be:
1. device_set_of_node_from_dev() assigns the OF node of the I3C controller
to the virtual I2C adapter.
2. i2c_add_adapter() then detects the OF node and instantiates the I2C child
node through the normal I2C OF path.
3. The same child node has already been parsed by the I3C core and added to
master->boardinfo.i2c.
4. i3c_master_i2c_adapter_init() then calls i2c_new_client_device() again
for the same device again and fails with -EBUSY.
For example, I see the following error:
> i2c i2c-4: Failed to register i2c client ptn5110 at 0x50 (-16)
Without commit f26ecaa0f0ab, i2c_add_adapter() will not instantiate any child
nodes because the virtual I2C adapter has no OF nodes.
The client is successfully instantiated from master->boardinfo.i2c as before.
After applying commit f26ecaa0f0ab, the client instantiated in the first path
(via i2c) is registered and functional. In my case, it is successfully bound to
the tcpci driver.
However, the second registration fails with -EBUSY, and i2cdev->dev is set to
ERR_PTR(-EBUSY) instead of valid I2C client.
I originally reproduced this on v6.12.y, and I have also confirmed the duplicate
client instantiation on v7.2.
The OF node is necessary for the purpose of commit f26ecaa0f0ab, but the I3C core
also needs to properly handle I2C devices written under the I3C controller,
and I'm not sure what the proper fix is.
I'd like to report the regression and the duplicate enumeration of child devices.
If this issue has already been reported or discussed, please disregard this report.
Thanks,
---
Best Regards
Kunihiko Hayashi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-02 2:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 2:51 [REGRESSION] i3c: dw: Duplicate I2C client registration Kunihiko Hayashi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®