Re: [PATCH] soc: qcom: pmic_glink_altmode: use a freezable workqueue

From: Val Packett

Date: Tue Jul 28 2026 - 20:09:34 EST



On 7/27/26 10:25 PM, Daniel J Blueman wrote:
On suspend wake, the DisplayPort altmode setup often executes
before devices have compeleted resuming; this triggers a legitimate
warning:
i2c i2c-2: Transfer while suspended
WARNING: drivers/i2c/i2c-core.h:57 at __i2c_transfer+0xc0/0x9a8
Workqueue: events pmic_glink_altmode_worker
Call trace:
__i2c_transfer
i2c_transfer
regmap_i2c_read
...
ps883x_sw_set
typec_switch_set
pmic_glink_altmode_worker

The setup doesn't succeed, leaving the DP-alt monitor non-working.

Fix this by queuing the work on the freezable workqueue instead,
deferring the setup until devices have resumed.

Observed and validated on a Lenovo Yoga Slim 7x X1E80100 when waking
from suspend with a USB-C DisplayPort monitor.

Fixes: 080b4e24852b ("soc: qcom: pmic_glink: Introduce altmode support")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Daniel J Blueman <daniel@xxxxxxxxx>
---
drivers/soc/qcom/pmic_glink_altmode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/qcom/pmic_glink_altmode.c b/drivers/soc/qcom/pmic_glink_altmode.c
index 619bad2c27ee..939a444ebe6e 100644
--- a/drivers/soc/qcom/pmic_glink_altmode.c
+++ b/drivers/soc/qcom/pmic_glink_altmode.c
@@ -450,7 +450,7 @@ static void pmic_glink_altmode_sc8180xp_notify(struct pmic_glink_altmode *altmod
alt_port->mode = mode;
alt_port->hpd_state = hpd_state;
alt_port->hpd_irq = hpd_irq;
- schedule_work(&alt_port->work);
+ queue_work(system_freezable_wq, &alt_port->work);
}
#define SC8280XP_DPAM_MASK 0x3f
@@ -501,7 +501,7 @@ static void pmic_glink_altmode_sc8280xp_notify(struct pmic_glink_altmode *altmod
alt_port->tbt_data = *tbt;
}
- schedule_work(&alt_port->work);
+ queue_work(system_freezable_wq, &alt_port->work);
}
static void pmic_glink_altmode_callback(const void *data, size_t len, void *priv)


BTW exactly this has been proposed previously:

https://lore.kernel.org/all/20250110-soc-qcom-pmic-glink-fix-device-access-on-worker-while-suspended-v1-1-e32fd6bf322e@xxxxxxxxxx/

It was concluded that this is a stop-gap solution until the notifications are fixed to not be sent at all while suspended… and of course neither the "real fix" nor this has landed :(

~val