From: sashiko-bot@kernel.org
To: "Andre Eikmeyer" <dev@deq.rocks>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH 1/2] HID: apple: preserve keyboard backlight across T2 resume
Date: Sat, 18 Jul 2026 12:35:57 +0000 [thread overview]
Message-ID: <20260718123558.0ABF41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260718121527.15924-1-dev@deq.rocks>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Removing the `LED_CORE_SUSPENDRESUME` flag reverts a previous power-management fix, causing the keyboard backlight to remain powered on during system suspend.
--
--- Patch [1]: [PATCH 1/2] HID: apple: preserve keyboard backlight across T2 resume ---
commit 2758811c67b214fbd3316fec3f21127f8166f490
Author: Andre Eikmeyer <dev@deq.rocks>
HID: apple: preserve keyboard backlight across T2 resume
This commit fixes an issue where the T2 virtual USB host controller
re-enumerates the internal keyboard on resume, resulting in the backlight
starting off. It caches the brightness during removal and restores it
during the subsequent probe.
Fixes: 1f95a6cd5ad7 ("HID: apple: ensure the keyboard backlight is off if suspending")
Cc: stable@vger.kernel.org
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
[ ... ]
> @@ -860,13 +864,20 @@ static int apple_backlight_init(struct hid_device *hdev)
> asc->backlight->cdev.name = "apple::kbd_backlight";
> asc->backlight->cdev.max_brightness = rep->backlight_on_max;
> asc->backlight->cdev.brightness_set_blocking = apple_backlight_led_set;
> - asc->backlight->cdev.flags = LED_CORE_SUSPENDRESUME;
> + /* VHCI re-enumeration restores the cached brightness in the next probe. */
[Severity: High]
Does removing the LED_CORE_SUSPENDRESUME flag cause the backlight to remain
on during system suspend?
The T2 butterfly keyboard hardware does not automatically power off its
backlight when suspending. When this flag is removed, the LED subsystem
bypasses led_classdev_suspend(), leaving the hardware illuminated and
draining the battery.
The new caching mechanism in apple_remove() successfully tracks the user
brightness preference, as led_classdev_suspend() only alters the physical
hardware state without modifying the logical led_cdev->brightness.
Could the device initialization issue have been caused by the hardcoded
apple_backlight_set(hdev, 0, 0) during probe, rather than the presence of
this suspend flag?
>
> - ret = apple_backlight_set(hdev, 0, 0);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260718121527.15924-1-dev@deq.rocks?part=1
next prev parent reply other threads:[~2026-07-18 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 12:15 [PATCH 1/2] HID: apple: preserve keyboard backlight across T2 resume Andre Eikmeyer
2026-07-18 12:15 ` [PATCH 2/2] HID: apple: use the standard keyboard backlight LED name Andre Eikmeyer
2026-07-18 12:36 ` sashiko-bot
2026-07-18 15:00 ` Andre Eikmeyer
2026-07-18 12:35 ` sashiko-bot [this message]
2026-07-18 15:00 ` [PATCH 1/2] HID: apple: preserve keyboard backlight across T2 resume Andre Eikmeyer
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=20260718123558.0ABF41F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dev@deq.rocks \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.