[PATCH 03/10] phy: rockchip: naneng-combphy: Fix Generic PHY reference counting

Kever Yang kever.yang at rock-chips.com
Sat Aug 30 18:45:58 CEST 2025


On 2025/7/22 06:07, Jonas Karlman wrote:
> 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 <jonas at kwiboo.se>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> index 5145b517aa4c..a3038d067d3a 100644
> --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> @@ -223,6 +223,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;


More information about the U-Boot mailing list