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 ?

+       if (rc)
+               rc = clk_get_by_name(dev->parent, "ref_clk", &clk);
+       if (!rc) {
+               priv->ref_clk = clk;
+
+               rc = clk_enable(&priv->ref_clk);
+               if (rc && rc != -ENOSYS)
+                       dev_warn(dev, "failed to enable ref clock: %d\n", rc);
+
+               dwc3->ref_clk = &priv->ref_clk;
        }
-       if (index >= 0)
-               dwc3->ref_clk = &glue->clks.clks[index];
  #endif
The rest is good, thank you !

Reply via email to