On 9/22/26 10:42 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);
+       /*
+        * Only fall back to the parent node's clocks if the parent is a
+        * dwc3 glue wrapper. When the generic node is a top level node,
+        * the parent is not the glue device but a bus or the root device,
+        * and its clocks are unrelated to the controller.
+        */
+       if (rc && dev->parent && strstr(dev->parent->driver->name, "dwc3")) {

Could dev->parent->driver be NULL ?

+               rc = clk_get_by_name(dev->parent, "ref", &clk);
+               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);

Shouldn't the driver fail to probe if clock cannot be enabled ?

[...]

Reply via email to