phy: samsung,dp-video-phy: deprecate syscon phandle
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 27 Jan 2023 19:40:53 +0000 (20:40 +0100)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 3 Feb 2023 19:20:59 +0000 (20:20 +0100)
The DisplayPort phy is actually part of the Power Management Unit system
controller, thus it should be its child, instead of sibling node with
syscon phandle.

Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20230127194057.186458-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/phy/samsung/phy-exynos-dp-video.c

index 2b670ef91deb7c74d7a7df962b03fd5535b7cb70..6069fedbd8f3bb0c1b477c787f60d4ddd0685acc 100644 (file)
@@ -83,8 +83,11 @@ static int exynos_dp_video_phy_probe(struct platform_device *pdev)
        if (!state)
                return -ENOMEM;
 
-       state->regs = syscon_regmap_lookup_by_phandle(dev->of_node,
-                                                     "samsung,pmu-syscon");
+       state->regs = syscon_node_to_regmap(dev->parent->of_node);
+       if (IS_ERR(state->regs))
+               /* Backwards compatible way */
+               state->regs = syscon_regmap_lookup_by_phandle(dev->of_node,
+                                                             "samsung,pmu-syscon");
        if (IS_ERR(state->regs)) {
                dev_err(dev, "Failed to lookup PMU regmap\n");
                return PTR_ERR(state->regs);