63 lines
1.9 KiB
Diff
63 lines
1.9 KiB
Diff
From git@z Thu Jan 1 00:00:00 1970
|
|
Subject: [PATCH v13 18/35] phy: rockchip: usbdp: Rename mode_change to
|
|
phy_needs_reinit
|
|
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
|
Date: Tue, 14 Jul 2026 21:26:19 +0200
|
|
Message-Id: <20260714-rockchip-usbdp-cleanup-v13-18-6cb3e769d4c5@collabora.com>
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset="utf-8"
|
|
Content-Transfer-Encoding: 7bit
|
|
|
|
Right now the mode_change property is set whenever the mode changes
|
|
between USB-only, DP-only and USB-DP. It is needed, because on any
|
|
mode change the PHY needs to be re-initialized. Apparently at least
|
|
DP also requires a re-init when the cable orientation is changed,
|
|
which is currently not being done (except when the orientation switch
|
|
also involves a mode change). Prepare for this by renaming mode_change
|
|
to phy_needs_reinit.
|
|
|
|
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
|
---
|
|
drivers/phy/rockchip/phy-rockchip-usbdp.c | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/phy/rockchip/phy-rockchip-usbdp.c
|
|
+++ b/drivers/phy/rockchip/phy-rockchip-usbdp.c
|
|
@@ -171,7 +171,7 @@ struct rk_udphy {
|
|
|
|
/* PHY status management */
|
|
bool flip;
|
|
- bool mode_change;
|
|
+ bool phy_needs_reinit;
|
|
u8 mode;
|
|
u8 status;
|
|
|
|
@@ -578,7 +578,7 @@ static void rk_udphy_mode_set(struct rk_
|
|
if (udphy->mode == mode)
|
|
return;
|
|
|
|
- udphy->mode_change = true;
|
|
+ udphy->phy_needs_reinit = true;
|
|
udphy->mode = mode;
|
|
}
|
|
|
|
@@ -951,15 +951,15 @@ static int rk_udphy_power_on(struct rk_u
|
|
|
|
if (udphy->mode & UDPHY_MODE_USB)
|
|
rk_udphy_u3_port_disable(udphy, false);
|
|
- udphy->mode_change = false;
|
|
- } else if (udphy->mode_change) {
|
|
+ udphy->phy_needs_reinit = false;
|
|
+ } else if (udphy->phy_needs_reinit) {
|
|
if (udphy->mode == UDPHY_MODE_DP)
|
|
rk_udphy_u3_port_disable(udphy, true);
|
|
|
|
ret = rk_udphy_init(udphy);
|
|
if (ret)
|
|
return ret;
|
|
- udphy->mode_change = false;
|
|
+ udphy->phy_needs_reinit = false;
|
|
}
|
|
|
|
udphy->status |= mode;
|