From d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 11 Dec 2023 02:45:28 +0000
Subject: [PATCH] add boot partition  size

---
 kernel/drivers/phy/rockchip/phy-rockchip-inno-video-phy.c |   21 ++++-----------------
 1 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/kernel/drivers/phy/rockchip/phy-rockchip-inno-video-phy.c b/kernel/drivers/phy/rockchip/phy-rockchip-inno-video-phy.c
index 65b1525..22d26f1 100644
--- a/kernel/drivers/phy/rockchip/phy-rockchip-inno-video-phy.c
+++ b/kernel/drivers/phy/rockchip/phy-rockchip-inno-video-phy.c
@@ -29,7 +29,6 @@
 	struct clk *pclk;
 	struct regmap *regmap;
 	struct reset_control *rst;
-	enum phy_mode mode;
 };
 
 static const struct reg_sequence ttl_mode[] = {
@@ -83,6 +82,7 @@
 static int inno_video_phy_power_on(struct phy *phy)
 {
 	struct inno_video_phy *inno = phy_get_drvdata(phy);
+	enum phy_mode mode = phy_get_mode(phy);
 	const struct reg_sequence *wseq;
 	bool dual_channel = phy_get_bus_width(phy) == 2 ? true : false;
 	int nregs;
@@ -92,8 +92,8 @@
 	clk_prepare_enable(inno->pclk);
 	pm_runtime_get_sync(inno->dev);
 
-	switch (inno->mode) {
-	case PHY_MODE_VIDEO_LVDS:
+	switch (mode) {
+	case PHY_MODE_LVDS:
 		if (dual_channel) {
 			wseq = lvds_mode_dual_channel;
 			nregs = ARRAY_SIZE(lvds_mode_dual_channel);
@@ -102,12 +102,10 @@
 			nregs = ARRAY_SIZE(lvds_mode_single_channel);
 		}
 		break;
-	case PHY_MODE_VIDEO_TTL:
+	default:
 		wseq = ttl_mode;
 		nregs = ARRAY_SIZE(ttl_mode);
 		break;
-	default:
-		return -EINVAL;
 	}
 
 	regmap_multi_reg_write(inno->regmap, wseq, nregs);
@@ -140,17 +138,6 @@
 
 static int inno_video_phy_set_mode(struct phy *phy, enum phy_mode mode)
 {
-	struct inno_video_phy *inno = phy_get_drvdata(phy);
-
-	switch (mode) {
-	case PHY_MODE_VIDEO_LVDS:
-	case PHY_MODE_VIDEO_TTL:
-		inno->mode = mode;
-		break;
-	default:
-		return -EINVAL;
-	}
-
 	return 0;
 }
 

--
Gitblit v1.6.2