summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJonas Karlman <[email protected]>2025-07-21 22:07:14 +0000
committerKever Yang <[email protected]>2025-08-31 00:48:15 +0800
commit12dd645914a4e5e65d92a4754d0dacbdbf1e4a55 (patch)
tree24afb4911f206439c16041b6c8b5128819096c43 /drivers
parent8a3d377d4ccd409b56b9a6eef20613472e4471fd (diff)
phy: rockchip: naneng-combphy: Use syscon_regmap_lookup_by_phandle
Change to use syscon_regmap_lookup_by_phandle() helper instead of finding the syscon udevice and making a call to syscon_get_regmap(). No runtime change is expected with this simplication. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/phy/rockchip/phy-rockchip-naneng-combphy.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
index 9345378aa50..d602f965d6a 100644
--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
@@ -176,22 +176,19 @@ static const struct phy_ops rockchip_combphy_ops = {
static int rockchip_combphy_parse_dt(struct udevice *dev,
struct rockchip_combphy_priv *priv)
{
- struct udevice *syscon;
int ret;
- ret = uclass_get_device_by_phandle(UCLASS_SYSCON, dev, "rockchip,pipe-grf", &syscon);
- if (ret) {
- dev_err(dev, "failed to find peri_ctrl pipe-grf regmap");
- return ret;
+ priv->pipe_grf = syscon_regmap_lookup_by_phandle(dev, "rockchip,pipe-grf");
+ if (IS_ERR(priv->pipe_grf)) {
+ dev_err(dev, "failed to find peri_ctrl pipe-grf regmap\n");
+ return PTR_ERR(priv->pipe_grf);
}
- priv->pipe_grf = syscon_get_regmap(syscon);
- ret = uclass_get_device_by_phandle(UCLASS_SYSCON, dev, "rockchip,pipe-phy-grf", &syscon);
- if (ret) {
+ priv->phy_grf = syscon_regmap_lookup_by_phandle(dev, "rockchip,pipe-phy-grf");
+ if (IS_ERR(priv->phy_grf)) {
dev_err(dev, "failed to find peri_ctrl pipe-phy-grf regmap\n");
- return ret;
+ return PTR_ERR(priv->phy_grf);
}
- priv->phy_grf = syscon_get_regmap(syscon);
ret = clk_get_by_index(dev, 0, &priv->ref_clk);
if (ret) {