[PATCH 4/8] phy: samsung,dp-video-phy: deprecate syscon phandle

Krzysztof Kozlowski posted 8 patches 2 years, 7 months ago
[PATCH 4/8] phy: samsung,dp-video-phy: deprecate syscon phandle
Posted by Krzysztof Kozlowski 2 years, 7 months ago
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.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---
---
 drivers/phy/samsung/phy-exynos-dp-video.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/samsung/phy-exynos-dp-video.c b/drivers/phy/samsung/phy-exynos-dp-video.c
index 2b670ef91deb..6069fedbd8f3 100644
--- a/drivers/phy/samsung/phy-exynos-dp-video.c
+++ b/drivers/phy/samsung/phy-exynos-dp-video.c
@@ -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);
-- 
2.34.1
Re: [PATCH 4/8] phy: samsung,dp-video-phy: deprecate syscon phandle
Posted by Vinod Koul 2 years, 7 months ago
On 27-01-23, 20:40, Krzysztof Kozlowski wrote:
> 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>

-- 
~Vinod
Re: (subset) [PATCH 4/8] phy: samsung,dp-video-phy: deprecate syscon phandle
Posted by Krzysztof Kozlowski 2 years, 7 months ago
On Fri, 27 Jan 2023 20:40:53 +0100, Krzysztof Kozlowski wrote:
> 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.
> 
> 

Applied, thanks!

[4/8] phy: samsung,dp-video-phy: deprecate syscon phandle
      https://git.kernel.org/krzk/linux/c/f765360d291e5f44d454eceb250008fc2e07badf

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>