On 9/17/26 4:24 PM, Stefan Eichenberger wrote:
Hello Stefan,
On Wed, Sep 16, 2026 at 10:43:50PM +0200, Marek Vasut wrote:
On 9/16/26 8:16 PM, Stefan Eichenberger wrote:
Hello Stefan,
+ rc = clk_get_by_name(dev, "ref", &clk);
+ if (rc)
+ rc = clk_get_by_name(dev, "ref_clk", &clk);
+ if (rc)
+ rc = clk_get_by_name(dev->parent, "ref", &clk);
One small nitpick -- would it make sense to validate whether the parent node
has "dwc3" or "snps" in its compatible string, so this wouldn't accidentally
attempt to grab clock of some completely unrelated bus node ?
I'm not sure if this is necessary
Necessary, I would argue yes, because if we don't do that, we might pick
up clock from some sort of unrelated device and that is simply a failure
to validate input.
, or indeed if it would make things
worse. For example, ti,am62-usb would not match even if it relied on the
fallback for the ref clock. The same applies to samsung,exynos990.dtsi,
which uses "samsung,exynos850-dwusb3". This would mean we would have to
list all the possible compatible strings, which would be difficult to
maintain.
Isn't that what Linux does as well ?
--
Best regards,
Marek Vasut