Thread (10 messages) 10 messages, 2 authors, 2d ago

Re: [PATCH net-next v3 4/5] net: phy: maxio: parse and enable PHY clock from generic DT binding

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-09-27 17:29:56
Also in: linux-devicetree, lkml

quoted hunk ↗ jump to hunk
 struct maxio_priv {
+	struct clk *clk;
 	bool clk_out_125m;
 };
 
@@ -57,6 +59,11 @@ static int maxio_mae0621a_probe(struct phy_device *phydev)
 		priv->clk_out_125m = true;
 	}
 
+	/* PHY clock from the generic PHY binding */
+	priv->clk = devm_clk_get_optional_enabled(&phydev->mdio.dev, NULL);
+	if (IS_ERR(priv->clk))
+		return PTR_ERR(priv->clk);
Since clk is not referenced anywhere after this, there is no need to
save it in priv.

     Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help