[PATCH v2 0/2] phy: qcom: qmp-combo: keep the Type-C callbacks off unclocked registers

From: Oleg Keri

Date: Wed Sep 16 2026 - 09:04:29 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.

Both were posted separately on 2026-09-09, patch 1 on its own and patch 2
as 2/2 of "fix forced com_init() error handling", whose 1/2 was withdrawn
the same day and is not resent: its remedy was wrong, and the init_count
imbalance it described is left for a separate patch.

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 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 | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

--
2.55.0

base-commit: a7728f5e1fc3d472a314acdabca6039f71ec3a9d