linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] phy: rockchip: naneng-combphy: compatible with old DT for RK3568
@ 2025-01-06  7:00 Chukun Pan
  2025-01-06  7:33 ` Philipp Zabel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chukun Pan @ 2025-01-06  7:00 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Heiko Stuebner, Philipp Zabel, Kishon Vijay Abraham I,
	Jianfeng Liu, linux-arm-kernel, linux-rockchip, linux-phy,
	linux-kernel, Chukun Pan

The device tree of RK3568 did not specify reset-names before.
So add fallback to old behaviour to be compatible with old DT.

Fixes: fbcbffbac994 ("phy: rockchip: naneng-combphy: fix phy reset")
Cc: Jianfeng Liu <liujianfeng1994@gmail.com>
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
 drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
index a1532ef8bbe9..372f5c07b5bd 100644
--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
@@ -325,6 +325,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");
+	/* fallback to old behaviour */
+	if (IS_ERR(ERR_PTR(priv->phy_rst)))
+		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");
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-06 21:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06  7:00 [PATCH 1/1] phy: rockchip: naneng-combphy: compatible with old DT for RK3568 Chukun Pan
2025-01-06  7:33 ` Philipp Zabel
2025-01-06  7:50   ` [PATCH 1/2] " Chukun Pan
2025-01-06  9:19     ` Philipp Zabel
2025-01-06 12:03 ` kernel test robot
2025-01-06 21:37 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).