Commit 3126ea9b authored by Chukun Pan's avatar Chukun Pan Committed by Vinod Koul
Browse files

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: fbcbffba ("phy: rockchip: naneng-combphy: fix phy reset")
Cc: Jianfeng Liu <liujianfeng1994@gmail.com>
Signed-off-by: default avatarChukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: default avatarJonas Karlman <jonas@kwiboo.se>
Link: https://lore.kernel.org/r/20250106100001.1344418-2-amadeus@jmu.edu.cn


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent fcf5d353
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -324,7 +324,10 @@ static int rockchip_combphy_parse_dt(struct device *dev, struct rockchip_combphy

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

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