From: Jiale Yao <yaojiale02@163.com>
To: Lee Jones <lee@kernel.org>,
mfd@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Jiale Yao <yaojiale02@163.com>
Subject: [PATCH 2/2] mfd: tps65010: queue I/O work on freezable workqueue
Date: Fri, 16 Oct 2026 18:05:03 +0800 [thread overview]
Message-ID: <20261016100503.2581955-3-yaojiale02@163.com> (raw)
In-Reply-To: <20261016100503.2581955-1-yaojiale02@163.com>
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@163.com>
---
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
next prev parent reply other threads:[~2026-10-16 10:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 10:05 [PATCH 0/2] mfd: freeze delayed I/O work during suspend Jiale Yao
2026-10-16 10:05 ` [PATCH 1/2] mfd: si476x: queue polling work on freezable workqueue Jiale Yao
2026-10-17 7:19 ` jiale yao
2026-10-16 10:05 ` Jiale Yao [this message]
2026-10-17 7:20 ` Re:[PATCH 2/2] mfd: tps65010: queue I/O " jiale yao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261016100503.2581955-3-yaojiale02@163.com \
--to=yaojiale02@163.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®