From: sashiko-bot@kernel.org
To: "Aaron Erhardt" <aer@tuxedocomputers.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH v6 3/3] HID: lamparray: blank lamps across suspend and restore on resume
Date: Wed, 16 Sep 2026 15:00:12 +0000 [thread overview]
Message-ID: <20260916150012.EE1EA1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260916144838.456239-4-aer@tuxedocomputers.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] hid: lamparray: blink timer overwrites blanked state during suspend
--
commit 0480546fa780aefd04da86e31cbb23c2cb7e6a3d
Author: Cristian Mazzotta <cmmazzo@icloud.com>
HID: lamparray: blank lamps across suspend and restore on resume
This commit adds power management callbacks to blank lamparray devices
during system suspend by writing zeroes to the color channels. It also
introduces a resume function to explicitly transition the device out of
autonomous mode and restore its cached color state.
> diff --git a/drivers/hid/hid-lamparray.c b/drivers/hid/hid-lamparray.c
> index acc00950495bf..c7d4d3d1b02d3 100644
> --- a/drivers/hid/hid-lamparray.c
> +++ b/drivers/hid/hid-lamparray.c
[ ... ]
> +void lamparray_suspend(struct lamparray *la)
> +{
> + struct lamparray_device *ldev;
> +
> + if (!la)
> + return;
> +
> + ldev = &la->ldev;
> +
> + if (!ldev->use_leds_uapi)
> + return;
> +
> + mutex_lock(&ldev->dev_lock);
> + lamparray_hw_set_state(ldev, 0, 0, 0, 0);
> + mutex_unlock(&ldev->dev_lock);
[Severity: Medium]
Will active LED software blink timers continue to fire during system
suspend and overwrite this blanked state?
If a userspace application or trigger enables software blinking on the
lamparray LED classdev before system suspend (e.g. s2idle), the timer
can continue to queue work to leds_wq. This will call
lamparray_hw_set_state() and overwrite the blanked (0,0,0,0) state set
here, causing high power draw and undermining the intent of this function.
Does the lamparray LED classdev initialization need to set the
LED_CORE_SUSPENDRESUME flag so the LED subsystem correctly applies
LED_SUSPENDED and prevents timers from queuing new brightness updates
during suspend?
> +
> + hid_hw_wait(ldev->hdev);
> +}
> +EXPORT_SYMBOL_GPL(lamparray_suspend);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916144838.456239-1-aer@tuxedocomputers.com?part=3
next prev parent reply other threads:[~2026-09-16 15:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 14:48 [PATCH v6 0/3] HID: generic: add LampArray support via hid-lamparray helper Aaron Erhardt
2026-09-16 14:48 ` [PATCH v6 1/3] HID: lamparray: add new LampArray helper module Aaron Erhardt
2026-09-16 15:00 ` sashiko-bot
2026-09-16 14:48 ` [PATCH v6 2/3] HID: generic: add LampArray support via hid-lamparray helper Aaron Erhardt
2026-09-16 14:48 ` [PATCH v6 3/3] HID: lamparray: blank lamps across suspend and restore on resume Aaron Erhardt
2026-09-16 15:00 ` sashiko-bot [this message]
2026-09-16 16:15 ` [PATCH v6 0/3] HID: generic: add LampArray support via hid-lamparray helper Cristian Mazzotta
2026-09-17 7:29 ` Aaron Erhardt
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=20260916150012.EE1EA1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aer@tuxedocomputers.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=sashiko-reviews@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