mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
phy: rockchip: usbdp: Rename mode_change to phy_needs_reinit
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. Tested-by: Igor Paunovic <royalnet026@gmail.com> # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-2-8d507cb1174f@collabora.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
4fd2c13cbb
commit
fbce9cc28c
|
|
@ -170,7 +170,7 @@ struct rk_udphy {
|
|||
|
||||
/* PHY status management */
|
||||
bool flip;
|
||||
bool mode_change;
|
||||
bool phy_needs_reinit;
|
||||
u8 mode;
|
||||
u8 status;
|
||||
|
||||
|
|
@ -577,7 +577,7 @@ static void rk_udphy_mode_set(struct rk_udphy *udphy, u8 mode)
|
|||
if (udphy->mode == mode)
|
||||
return;
|
||||
|
||||
udphy->mode_change = true;
|
||||
udphy->phy_needs_reinit = true;
|
||||
udphy->mode = mode;
|
||||
}
|
||||
|
||||
|
|
@ -950,15 +950,15 @@ static int rk_udphy_power_on(struct rk_udphy *udphy, u8 mode)
|
|||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user