[PATCH v3 0/2] phy: qcom: qmp-combo: keep the Type-C callbacks off unclocked registers
From: Oleg Keri
Date: Wed Sep 16 2026 - 09:55:25 EST
The typec_switch and typec_mux callbacks of the QMP combo PHY tear the
common block down and bring it back up with force=true on every USB-C
orientation or altmode change. Two things go wrong on that path.
Patch 1: the callbacks hold no runtime PM reference, so releasing the
clocks during the teardown can drop the device's last reference and
re-enter qmp_combo_runtime_suspend() from clk_core_unprepare(), which
then disables clocks that are already being torn down. Seen as
"gcc_usb3_prim_phy_pipe_clk already disabled" warnings from the
pmic_glink_altmode_worker on a Lenovo Yoga Slim 7x Gen 11 (Snapdragon X2
Elite) once runtime PM is allowed from userspace.
Patch 2: the result of the forced qmp_combo_com_init() is discarded, so a
failed bringup is followed by register writes with the clocks off. Found
by inspection; it needs the bringup to fail.
Tested on next-20260915 on the Yoga Slim 7x Gen 11 with a USB-C DisplayPort
display: plug, unplug and orientation changes, no clock warnings.
Changes in v3:
- Patch 2: on a failed bringup restore the previously cached mode and
clear the cached orientation, so the next Type-C event retries instead
of being short-circuited as already configured (Sashiko review on v2).
The commit message now also says plainly that a consumer's later
phy_power_off() still reaches an unclocked PHY until that retry; that
is pre-existing and not addressed by this series.
- Patch 1: unchanged.
- Link to v2: https://lore.kernel.org/all/20260916125619.4587-1-okerixx@xxxxxxxxx/
Changes in v2:
- Rebased on next-20260915, where "phy: qualcomm: qmp-combo: Add
preliminary USB4 support" moved the mux callback's teardown and bringup
into qmp_combo_reconfigure_phy(). The runtime PM reference is now
taken in both callbacks before that helper runs; the com_init() check
moved into the helper, so qmp_combo_usb4_init(), which already checks
the helper's return value, sees the failure too.
- Both patches carry a Fixes: tag for the commit that introduced the
forced re-init path.
- Link to patch 1 v1: https://lore.kernel.org/all/20260909140345.4239-1-okerixx@xxxxxxxxx/
- Link to patch 2 v1: https://lore.kernel.org/all/20260909151443.10276-3-okerixx@xxxxxxxxx/
Oleg Keri (2):
phy: qcom: qmp-combo: hold a runtime PM reference in the typec
callbacks
phy: qcom: qmp-combo: check qmp_combo_com_init() in the typec
callbacks
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
--
2.55.0
base-commit: a7728f5e1fc3d472a314acdabca6039f71ec3a9d