* [PATCH] clk: en7523: drop PHY_MODE_USB_DEVICE_SS from serdes mux guards
@ 2026-11-28 11:19 Krishna Kurapati
0 siblings, 0 replies; only message in thread
From: Krishna Kurapati @ 2026-11-28 11:19 UTC (permalink / raw)
To: Stephen Boyd, Brian Masney, Jerome Brunet
Cc: linux-clk, linux-kernel, Krishna Kurapati
The two USB serdes port validation guards in en7581_serdes_phy_set_mode()
accepted PHY_MODE_USB_DEVICE_SS as an alias for PHY_MODE_USB_DEVICE.
No caller in the tree ever passed PHY_MODE_USB_DEVICE_SS to these paths —
the _SS guard was therefore dead code. Both cases already fell into the
same else branch (REG_SSUSB_HSGMII_SEL_USB / REG_USB_PCIE_SEL_USB), so
the two modes were handled identically anyway.
As a prerequisite to removing the eight speed-suffixed enum phy modes:
PHY_MODE_USB_{HOST,DEVICE}_{LS,FS,HS,SS} in favour of communicating link
speed through phy_configure(), remove the dead _SS arms here.
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
---
I don't have a device to test this change. Hence compile testing with
W=1 now. This is a pre-requisite patch to remove the dead suffix enums.
The effort being put now is to remove the speed suffixed enums and replace
them with phy_configure API to let consumer drivers set usb phy opts along
with phy_set_mode call being done here. If the maintainers decide that
this change is not dead code removal and _SS enum is intended in the code,
although no one sets in the tree currently, then phy_configure can be done
from consumer drivers.
---
drivers/clk/clk-en7523.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
index b38d7b5dc0ac..a30b83a5020c 100644
--- a/drivers/clk/clk-en7523.c
+++ b/drivers/clk/clk-en7523.c
@@ -942,8 +942,7 @@ static int en7581_serdes_phy_set_mode(struct phy *phy, enum phy_mode mode,
reg = REG_NP_SCU_SSR3;
mask = REG_SSUSB_HSGMII_SEL_MASK;
- if (mode != PHY_MODE_ETHERNET && mode != PHY_MODE_USB_DEVICE &&
- mode != PHY_MODE_USB_DEVICE_SS)
+ if (mode != PHY_MODE_ETHERNET && mode != PHY_MODE_USB_DEVICE)
return -EINVAL;
if (mode == PHY_MODE_ETHERNET)
@@ -956,8 +955,7 @@ static int en7581_serdes_phy_set_mode(struct phy *phy, enum phy_mode mode,
reg = REG_NP_SCU_SSTR;
mask = REG_USB_PCIE_SEL_MASK;
- if (mode != PHY_MODE_PCIE && mode != PHY_MODE_USB_DEVICE &&
- mode != PHY_MODE_USB_DEVICE_SS)
+ if (mode != PHY_MODE_PCIE && mode != PHY_MODE_USB_DEVICE)
return -EINVAL;
if (mode == PHY_MODE_PCIE)
---
base-commit: d8f05ec001e838cdb94fc14efa7c411e676f9ab9
change-id: 20261128-clk-change-phy-modify-0f08730f5863
Best regards,
--
Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-28 11:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-28 11:19 [PATCH] clk: en7523: drop PHY_MODE_USB_DEVICE_SS from serdes mux guards Krishna Kurapati
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®