From: Jonas Karlman Date: Mon, 21 Jul 2025 22:07:12 +0000 (+0000) Subject: phy: rockchip: naneng-combphy: Fix Generic PHY reference counting X-Git-Tag: v2025.10-rc4~8^2~7 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfd2774cfc4434ef35b48febcd1dc1860a3dc8f8;p=pandora-u-boot.git phy: rockchip: naneng-combphy: Fix Generic PHY reference counting Generic PHY reference counting helps ensure driver ops for init/exit and power on/off are called at correct state. For this to work the PHY driver must initialize PHY-id to a persistent value in of_xlate ops. The Rockchip COMBPHY driver does not initialize the PHY-id field, this typically lead to use of unshared reference counting among different struct phy instances. Initialize the PHY-id in of_xlate ops to ensure use of shared reference counting among all struct phy instances. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c index 6d8d10750b1..a66be0608d4 100644 --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c @@ -224,6 +224,7 @@ static int rockchip_combphy_xlate(struct phy *phy, struct ofnode_phandle_args *a return -EINVAL; } + phy->id = priv->id; priv->mode = args->args[0]; return 0;