From: sashiko-bot@kernel.org
To: "Jiale Yao" <yaojiale02@163.com>, linux-leds@vger.kernel.org
Cc: lee@kernel.org
Subject: Re: [PATCH 1/2] leds: tps6131x: queue torch refresh work on freezable workqueue
Date: Fri, 16 Oct 2026 10:17:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-174141@kernel.org> (raw)
In-Reply-To: <20261016100435.2581303-2-yaojiale02@163.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] leds: tps6131x: torch unintentionally turns back on upon system resume
- [Low] leds: Commit message description is not capitalized
--
commit f183582cffa51c16f099031455716678dcb8eab8
Author: Jiale Yao <yaojiale02@163.com>
leds: tps6131x: queue torch refresh work on freezable workqueue
This commit changes the torch refresh watchdog work to use the
system_freezable_wq instead of the non-freezable system workqueue. This
prevents the work from running and attempting I2C register writes after
the I2C adapter has been suspended.
> leds: tps6131x: queue torch refresh work on freezable workqueue
[Severity: Low]
This isn't a bug, but the description after the subsystem prefix should
be capitalized. Should "queue" be changed to "Queue" to align with the
subsystem conventions?
> diff --git a/drivers/leds/flash/leds-tps6131x.c b/drivers/leds/flash/leds-tps6131x.c
> index 5c9a5af5af05c..841a6538e75e1 100644
> --- a/drivers/leds/flash/leds-tps6131x.c
> +++ b/drivers/leds/flash/leds-tps6131x.c
[ ... ]
> @@ -307,8 +308,9 @@ static void tps6131x_torch_refresh_handler(struct work_struct *work)
> return;
> }
>
> - schedule_delayed_work(&tps6131x->torch_refresh_work,
> - TPS6131X_TORCH_REFRESH_INTERVAL_JIFFIES);
> + queue_delayed_work(system_freezable_wq,
> + &tps6131x->torch_refresh_work,
> + TPS6131X_TORCH_REFRESH_INTERVAL_JIFFIES);
> }
[Severity: Medium]
Does this unintentionally cause the torch to turn back on upon system resume?
Because the driver does not set the LED_CORE_SUSPENDRESUME flag, the LED is
not cleanly turned off and its workqueue canceled during suspend. Instead,
during suspend, the hardware watchdog will automatically shut off the LED
after 13 seconds.
When using the previous non-freezable system workqueue, the handler would
execute during suspend, fail to perform I2C transfers because the adapter
is suspended, and return without rescheduling itself. This cleanly broke the
refresh loop.
Now that the workqueue is freezable, won't it simply pause during suspend
and thaw upon resume? When it thaws, tps6131x_torch_refresh_handler() will
execute and force the torch back on via I2C, which seems like an unintended
behavioral regression.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016100435.2581303-1-yaojiale02@163.com?part=1
next prev parent reply other threads:[~2026-10-16 10:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 10:04 [PATCH 0/2] leds: freeze delayed hardware access during suspend Jiale Yao
2026-10-16 10:04 ` [PATCH 1/2] leds: tps6131x: queue torch refresh work on freezable workqueue Jiale Yao
2026-10-16 10:17 ` sashiko-bot [this message]
2026-10-16 10:04 ` [PATCH 2/2] leds: cr0014114: queue recount " Jiale Yao
2026-10-16 10:15 ` sashiko-bot
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=sashiko-outbox-174141@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=sashiko-reviews@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