From: Lee Jones <lee@kernel.org>
To: Jiale Yao <yaojiale02@163.com>
Cc: mfd@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mfd: tps65010: queue I/O work on freezable workqueue
Date: Wed, 28 Oct 2026 14:39:39 +0000 [thread overview]
Message-ID: <20261028143939.GC3605912@google.com> (raw)
In-Reply-To: <20261016100503.2581955-3-yaojiale02@163.com>
On Fri, 16 Oct 2026, Jiale Yao wrote:
> 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);
Use 100-chars to prevent this crazy line-wrapping.
> }
> 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
>
--
Lee Jones
prev parent reply other threads:[~2026-10-28 14:39 UTC|newest]
Thread overview: 6+ 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 ` [PATCH 2/2] mfd: tps65010: queue I/O " Jiale Yao
2026-10-17 7:20 ` jiale yao
2026-10-28 14:39 ` Lee Jones [this message]
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=20261028143939.GC3605912@google.com \
--to=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=yaojiale02@163.com \
/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®