From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Frank Li <Frank.Li@nxp.com>,
Peter Yin <peteryin.openbmc@gmail.com>
Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [REGRESSION] i3c: dw: Duplicate I2C client registration
Date: Fri, 2 Oct 2026 11:51:59 +0900 [thread overview]
Message-ID: <2b18d52b-a245-4c7d-abb2-622cd3cea428@socionext.com> (raw)
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
reply other threads:[~2026-10-02 2:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2b18d52b-a245-4c7d-abb2-622cd3cea428@socionext.com \
--to=hayashi.kunihiko@socionext.com \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peteryin.openbmc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®