[PATCH 2/2] mfd: tps65010: queue I/O work on freezable workqueue
From: Jiale Yao
Date: Fri Oct 16 2026 - 06:11:25 EST
The TPS65010 event worker performs SMBus transfers and can reschedule
itself to poll the charging state. The power-efficient system workqueue
is not freezable, so pending work can access an I2C adapter after it has
been suspended.
Use the freezable power-efficient workqueue for every scheduling path.
This preserves the power-efficient behavior while freezing I/O across
system suspend.
Signed-off-by: Jiale Yao <yaojiale02@xxxxxxx>
---
drivers/mfd/tps65010.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
index 8a144ec52201..b038d67ff715 100644
--- a/drivers/mfd/tps65010.c
+++ b/drivers/mfd/tps65010.c
@@ -230,7 +230,7 @@ static int dbg_show(struct seq_file *s, void *_)
seq_printf(s, "mask2 %s\n", buf);
/* ignore ackint2 */
- queue_delayed_work(system_power_efficient_wq, &tps->work,
+ queue_delayed_work(system_freezable_power_efficient_wq, &tps->work,
POWER_POLL_DELAY);
/* VMAIN voltage, enable lowpower, etc */
@@ -388,7 +388,7 @@ static void tps65010_interrupt(struct tps65010 *tps)
&& (tps->chgstatus & (TPS_CHG_USB|TPS_CHG_AC)))
poll = 1;
if (poll)
- queue_delayed_work(system_power_efficient_wq, &tps->work,
+ queue_delayed_work(system_freezable_power_efficient_wq, &tps->work,
POWER_POLL_DELAY);
/* also potentially gpio-in rise or fall */
@@ -436,7 +436,7 @@ static irqreturn_t tps65010_irq(int irq, void *_tps)
disable_irq_nosync(irq);
set_bit(FLAG_IRQ_ENABLE, &tps->flags);
- queue_delayed_work(system_power_efficient_wq, &tps->work, 0);
+ queue_delayed_work(system_freezable_power_efficient_wq, &tps->work, 0);
return IRQ_HANDLED;
}
@@ -694,7 +694,8 @@ int tps65010_set_vbus_draw(unsigned mA)
&& test_and_set_bit(
FLAG_VBUS_CHANGED, &the_tps->flags)) {
/* gadget drivers call this in_irq() */
- queue_delayed_work(system_power_efficient_wq, &the_tps->work,
+ queue_delayed_work(system_freezable_power_efficient_wq,
+ &the_tps->work,
0);
}
local_irq_restore(flags);
@@ -1052,4 +1053,3 @@ static void __exit tps_exit(void)
i2c_del_driver(&tps65010_driver);
}
module_exit(tps_exit);
-
--
2.34.1