From: Tom Hsieh <hungen3108@gmail.com>
To: eichest@gmail.com, marek.vasut@mailbox.org
Cc: marek.vasut+usb@mailbox.org, stefan.eichenberger@toradex.com,
trini@konsulko.com, hayashi.kunihiko@socionext.com,
u-boot@lists.u-boot-project.org, Tom.Hsieh@advantech.com
Subject: Re: [PATCH v1] usb: dwc3-generic: fix ref clock lookup indexing wrong clk_bulk array
Date: Tue, 22 Sep 2026 08:40:31 +0800 [thread overview]
Message-ID: <20260922004031.704968-1-hungen3108@gmail.com> (raw)
In-Reply-To: <arD0gD8AMpO_B6kT@eichest-laptop>
Hi Stefan,
Thanks for looking into this. There are examples of standalone
"snps,dwc3" nodes, such as rp1_usb0 and rp1_usb1 in
dts/upstream/src/arm64/broadcom/rp1-common.dtsi.
What I am still missing is the binding path from such a node to
dwc3_generic_probe(). Neither dwc3-generic-host nor
dwc3-generic-peripheral has an of_match table. The direct "snps,dwc3"
match is provided by xhci-dwc3, when that driver is enabled, and uses a
separate probe implementation.
The platform binding path I found for the two generic drivers is
dwc3_glue_bind_common(), called by dwc3_glue_bind():
device_bind_driver_to_node(parent, driver, name, node, &dev);
Here, parent is the glue device. This also holds for the flattened-DT
case: the glue and controller devices share an ofnode, but the controller
device is still bound as a child of the glue device.
So my understanding is that merely describing a standalone "snps,dwc3"
node would not make dwc3_generic_probe() run with an unrelated bus device
as its parent. On the current normal in-tree binding paths, the proposed
driver-name test would pass.
Is there another binding path you had in mind?
An explicit check could still serve as a defensive guard. My concern with
strstr() is that it checks a naming convention rather than the parent's
role. If documenting the existing assumption is sufficient, a comment
explaining that dev->parent is the glue device which bound this controller
might help.
I am happy to leave the choice of guard to you and Marek - this is just
to clarify the binding path.
Regards,
Tom
next prev parent reply other threads:[~2026-09-22 0:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 18:16 [PATCH v1] usb: dwc3-generic: fix ref clock lookup indexing wrong clk_bulk array Stefan Eichenberger
2026-09-16 20:43 ` Marek Vasut
2026-09-17 14:24 ` Stefan Eichenberger
2026-09-17 21:55 ` Marek Vasut
2026-09-21 5:44 ` Tom Hsieh
2026-09-21 9:10 ` Stefan Eichenberger
2026-09-21 9:40 ` Marek Vasut
2026-09-22 20:11 ` Stefan Eichenberger
2026-09-22 0:40 ` Tom Hsieh [this message]
2026-09-22 2:01 ` Tom Hsieh
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=20260922004031.704968-1-hungen3108@gmail.com \
--to=hungen3108@gmail.com \
--cc=Tom.Hsieh@advantech.com \
--cc=eichest@gmail.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=marek.vasut+usb@mailbox.org \
--cc=marek.vasut@mailbox.org \
--cc=stefan.eichenberger@toradex.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
/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