Skip to content

Commit 3126ea9

Browse files
aiamadeusvinodkoul
authored andcommitted
phy: rockchip: naneng-combphy: compatible reset with old DT
The device tree of RK3568 did not specify reset-names before. So add fallback to old behaviour to be compatible with old DT. Fixes: fbcbffb ("phy: rockchip: naneng-combphy: fix phy reset") Cc: Jianfeng Liu <liujianfeng1994@gmail.com> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Jonas Karlman <jonas@kwiboo.se> Link: https://lore.kernel.org/r/20250106100001.1344418-2-amadeus@jmu.edu.cn Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent fcf5d35 commit 3126ea9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/phy/rockchip/phy-rockchip-naneng-combphy.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,10 @@ static int rockchip_combphy_parse_dt(struct device *dev, struct rockchip_combphy
324324

325325
priv->ext_refclk = device_property_present(dev, "rockchip,ext-refclk");
326326

327-
priv->phy_rst = devm_reset_control_get(dev, "phy");
327+
priv->phy_rst = devm_reset_control_get_exclusive(dev, "phy");
328+
/* fallback to old behaviour */
329+
if (PTR_ERR(priv->phy_rst) == -ENOENT)
330+
priv->phy_rst = devm_reset_control_array_get_exclusive(dev);
328331
if (IS_ERR(priv->phy_rst))
329332
return dev_err_probe(dev, PTR_ERR(priv->phy_rst), "failed to get phy reset\n");
330333

0 commit comments

Comments
 (0)