Re: [PATCH v3 4/4] net: phy: at803x: add RX and TX clock management for IPQ5018 PHY
From: Andrew Lunn
Date: Fri Jun 05 2026 - 10:29:39 EST
On Fri, Jun 05, 2026 at 04:41:29PM +0400, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@xxxxxxxxxxx>
>
> Acquire and manage the RX and TX clocks for the IPQ5018 PHY.
> These clocks are required for the PHY's datapath to function correctly.
> Gate the clocks upon link state changes for improved power management.
> static void ipq5018_link_change_notify(struct phy_device *phydev)
> {
> + struct ipq5018_priv *priv = phydev->priv;
> + int ret;
> +
> + if (phydev->link) {
> + if (!__clk_is_enabled(priv->rx_clk)) {
Using __ methods is usually a bad sign.
The logical also seems a bit odd. In order to get link, you need to Rx
and Tx. Or is this device able to perform autoneg, send link pulses,
without these clocks?
Maybe when we have a better understanding of the requirements, we can
find a better way to use the CCF without needing to go to its insides.
Andrew