Linux LED subsystem development
 help / color / mirror / Atom feed
* [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger
@ 2026-12-03 12:06 Qiling Zhu
  2026-12-03 12:06 ` [PATCH v6 1/6] platform/x86: thinkpad_acpi: Report auto keyboard backlight mode as off Qiling Zhu
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Qiling Zhu @ 2026-12-03 12:06 UTC (permalink / raw)
  To: Mark Pearson, Derek J. Clark, Rong Zhang, Hans de Goede,
	Ilpo Järvinen, Henrique de Moraes Holschuh
  Cc: platform-driver-x86, linux-kernel, ibm-acpi-devel, Lee Jones,
	Pavel Machek, Griffin Kroah-Hartman, linux-leds, vishnuocv,
	vsankar, Andrea Rabbaglietti

Hi all,

On supported ThinkPads, Fn+Space can select automatic keyboard
backlight control.  This series exposes that mode through the private
LED trigger "tpacpi-kbd-auto", following the hw control trigger
framework and its ideapad-laptop example.  The first patch fixes an
out-of-range brightness value that was reported to make UPower stop
tracking hotkey changes on a ThinkPad X9-14 Gen 1.

The patches:

  1/6  Report auto keyboard backlight mode as off          (stable)
  2/6  Extract kbdlight notify helpers                  (refactor)
  3/6  Don't poke keyboard backlight's LED core brightness (writes)
  4/6  Restore keyboard backlight level ourselves       (sleep/wake)
  5/6  Detect auto-mode capability via MLCG             (groundwork)
  6/6  Add a keyboard backlight auto-mode trigger         (feature)

A few notes on the design:

- The auto mode is EC level 3 and not a brightness, so it is reported
  as 0 to the LED core.  The trigger is registered when MLCG bit 20
  says the EC supports the auto mode, and it is attached by default if
  the EC is already in auto mode when the driver loads.

- 4/6 drops kbdlight_suspend() and has kbdlight_resume() write the
  cached EC level back on every model: with thinkpad_acpi unloaded,
  the firmware turned the backlight off for s2idle and hibernation on
  my machine, and the EC came back at its previous level after s2idle
  and at 0 after hibernation.  No LED_SUSPENDED gate is kept: this LED
  does not set LED_CORE_SUSPENDRESUME, and with the suspend callback
  gone I do not see what would set the flag for it.  With 1/6 on its
  own, a backlight that went to sleep in auto mode comes back off
  after resume on kernels that still use the LED core suspend/resume
  path; the rest of the series restores the level the EC had.

- kbdlight_brightness now holds the raw EC level, including the auto
  mode, rather than a brightness; a comment above the variable says
  so, and the name is unchanged.

Changes since v5:

- 5/6 defines TPACPI_KBD_LIGHT_AUTO_CAPABLE_BIT with BIT(), as Ilpo
  suggested; the name is kept.  No other code change, and the
  Reviewed-by tags are unchanged.  Sent following Ilpo's suggestion on
  the timing.

Changes since v4, in short: 2/6 now contains the changes to the notify
helpers that 4/6 used to make, 4/6 shrank accordingly, and 5/6 dropped
a redundant comment.  Details are in the v5 thread:

  https://lore.kernel.org/r/20261130131252.80436-1-kmatzkaczor244@gmail.com/

Testing was done on a ThinkPad X1 Carbon Gen 14 (linux-next
next-20261030): the software paths, the trigger following Fn+Space in
and out of auto mode, and suspend/resume from manual levels and from
auto mode.  S3-capable models and other models are still untested, and
testing there would be very welcome.  One observation from testing
with a desktop session: KDE's power management can write back the
keyboard brightness it last knew about after resume, so a level
written directly through sysfs may be replaced by it.  The series also
applies cleanly to the current linux-next.

The checkpatch.pl --strict warnings I see are for three commit IDs that
are missing from my shallow clone.

This series was developed with LLM assistance; I reviewed every design
decision against the framework sources and validated the behavior on
real hardware myself.

Thank you all for your time and for the reviews of the earlier
versions.

Regards,
Qiling Zhu

Qiling Zhu (6):
  platform/x86: thinkpad_acpi: Report auto keyboard backlight mode as
    off
  platform/x86: thinkpad_acpi: Extract kbdlight notify helpers
  platform/x86: thinkpad_acpi: Don't poke keyboard backlight's LED core
    brightness
  platform/x86: thinkpad_acpi: Restore keyboard backlight level
    ourselves
  platform/x86: thinkpad_acpi: Detect auto-mode capability via MLCG
  platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode
    trigger

 drivers/platform/x86/lenovo/Kconfig         |   1 +
 drivers/platform/x86/lenovo/thinkpad_acpi.c | 183 +++++++++++++++-----
 2 files changed, 142 insertions(+), 42 deletions(-)


base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c
-- 
2.56.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v6 1/6] platform/x86: thinkpad_acpi: Report auto keyboard backlight mode as off
  2026-12-03 12:06 [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
@ 2026-12-03 12:06 ` Qiling Zhu
  2026-12-03 12:07 ` [PATCH v6 2/6] platform/x86: thinkpad_acpi: Extract kbdlight notify helpers Qiling Zhu
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Qiling Zhu @ 2026-12-03 12:06 UTC (permalink / raw)
  To: Mark Pearson, Derek J. Clark, Rong Zhang, Hans de Goede,
	Ilpo Järvinen, Henrique de Moraes Holschuh
  Cc: platform-driver-x86, linux-kernel, ibm-acpi-devel, Lee Jones,
	Pavel Machek, Griffin Kroah-Hartman, linux-leds, vishnuocv,
	vsankar, Andrea Rabbaglietti

The EC keyboard backlight level 3, which selects the auto mode, is
passed to the LED classdev verbatim by kbdlight_sysfs_get().  The LED
then reports a brightness of 3 with max_brightness 2, both through the
brightness sysfs attribute and through brightness_hw_changed
notifications.

This is not only cosmetic.  According to a report on a ThinkPad X9-14
Gen 1, UPower 1.91.x treats the out-of-range value as invalid and stops
watching brightness_hw_changed, so the desktop no longer follows the
Fn+Space hotkey after auto mode has been entered.

The auto mode is not a brightness level.  Report it as 0, which is
within the exported brightness range, in a new helper,
kbdlight_level_to_brightness(), as ideapad-laptop does for its auto
mode.

Fixes: bb28f3d51ff5 ("thinkpad_acpi: Add support for keyboard backlight")
Reported-by: Andrea Rabbaglietti <rabbagliettiandrea@gmail.com>
Closes: https://lore.kernel.org/r/CAENjc+w0Rqy=kDSew7XtNJCSvyPiXPJ5faWdmCr5RGYFhpunCA@mail.gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Qiling Zhu <kmatzkaczor244@gmail.com>
Reviewed-by: Rong Zhang <i@rong.moe>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>

---
With this patch on its own, on kernels that still use the LED core
suspend/resume path, a backlight that went to sleep in auto mode comes
back off after resume; before, it came back in auto mode, since that
path wrote the unmapped value back.  The rest of this series restores
the level the EC had.
---
 drivers/platform/x86/lenovo/thinkpad_acpi.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index 4f81855ad..31d3721bb 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -5102,6 +5102,9 @@ static struct ibm_struct video_driver_data = {
  * Keyboard backlight subdriver
  */
 
+/* EC level that selects the auto mode for the keyboard backlight */
+#define TPACPI_KBD_LIGHT_AUTO_LEVEL 3
+
 static enum led_brightness kbdlight_brightness;
 static DEFINE_MUTEX(kbdlight_mutex);
 
@@ -5135,6 +5138,15 @@ static int kbdlight_get_level(void)
 	return status & 0x3;
 }
 
+static int kbdlight_level_to_brightness(int level)
+{
+	/* Auto mode is not a brightness level; report it as off. */
+	if (level == TPACPI_KBD_LIGHT_AUTO_LEVEL)
+		return 0;
+
+	return level;
+}
+
 static bool kbdlight_is_supported(void)
 {
 	int status = 0;
@@ -5194,7 +5206,7 @@ static enum led_brightness kbdlight_sysfs_get(struct led_classdev *led_cdev)
 	if (level < 0)
 		return 0;
 
-	return level;
+	return kbdlight_level_to_brightness(level);
 }
 
 static struct tpacpi_led_classdev tpacpi_led_kbdlight = {
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v6 2/6] platform/x86: thinkpad_acpi: Extract kbdlight notify helpers
  2026-12-03 12:06 [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
  2026-12-03 12:06 ` [PATCH v6 1/6] platform/x86: thinkpad_acpi: Report auto keyboard backlight mode as off Qiling Zhu
@ 2026-12-03 12:07 ` Qiling Zhu
  2026-12-03 12:07 ` [PATCH v6 3/6] platform/x86: thinkpad_acpi: Don't poke keyboard backlight's LED core brightness Qiling Zhu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Qiling Zhu @ 2026-12-03 12:07 UTC (permalink / raw)
  To: Mark Pearson, Derek J. Clark, Rong Zhang, Hans de Goede,
	Ilpo Järvinen, Henrique de Moraes Holschuh
  Cc: platform-driver-x86, linux-kernel, ibm-acpi-devel, Lee Jones,
	Pavel Machek, Griffin Kroah-Hartman, linux-leds, vishnuocv,
	vsankar, Andrea Rabbaglietti

TP_HKEY_EV_KBD_LIGHT handling in tpacpi_driver_event() reads back the
brightness, compares it with the cached value and notifies the LED core
inline.  Extract this block into two helpers: kbdlight_notify_level()
takes an EC level, compares it with the cached value, updates the cache
and notifies the LED core, translating the level to a brightness on the
way, as kbdlight_sysfs_get() does; kbdlight_notify_change() reads the
level back and calls the former under kbdlight_mutex.

kbdlight_notify_level() expects the caller to hold kbdlight_mutex, so
that the proc write path can reuse it with the level it has just
written in a subsequent change.

The helpers work in EC levels rather than brightness values, as the
rest of the series builds on that.  This differs from the original code
in two situations: a change from off to the auto mode or back, which
reads back as the same brightness, now produces a notification
reporting 0 when the cached value holds the EC level, where the
original code sent none; and a failed read of the level now sends no
notification and leaves the cached value alone, where the original code
went on with a brightness of 0.

kbdlight_brightness is still an enum led_brightness at this point, and
kbdlight_init() still fills it in from the reported brightness; a later
change in this series makes it an int that tracks the EC level from
init on.

Signed-off-by: Qiling Zhu <kmatzkaczor244@gmail.com>
Reviewed-by: Rong Zhang <i@rong.moe>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
---
 drivers/platform/x86/lenovo/thinkpad_acpi.c | 48 ++++++++++++++-------
 1 file changed, 32 insertions(+), 16 deletions(-)

diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index 31d3721bb..3ef857542 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -5267,6 +5267,36 @@ static int kbdlight_set_level_and_update(int level)
 	return ret;
 }
 
+static void kbdlight_notify_level(int level)
+{
+	struct led_classdev *led_cdev = &tpacpi_led_kbdlight.led_classdev;
+
+	lockdep_assert_held(&kbdlight_mutex);
+
+	/*
+	 * Check the level actually changed, setting the level
+	 * through kbdlight_set_level() also triggers this event.
+	 */
+	if (level == kbdlight_brightness)
+		return;
+
+	kbdlight_brightness = level;
+	led_classdev_notify_brightness_hw_changed(led_cdev, kbdlight_level_to_brightness(level));
+}
+
+static void kbdlight_notify_change(void)
+{
+	int level;
+
+	guard(mutex)(&kbdlight_mutex);
+
+	level = kbdlight_get_level();
+	if (level < 0)
+		return;
+
+	kbdlight_notify_level(level);
+}
+
 static int kbdlight_read(struct seq_file *m)
 {
 	int level;
@@ -11593,22 +11623,8 @@ static bool tpacpi_driver_event(const unsigned int hkey_event)
 		/* Key events are suppressed by default hotkey_user_mask */
 		return false;
 	case TP_HKEY_EV_KBD_LIGHT:
-		if (tp_features.kbdlight) {
-			enum led_brightness brightness;
-
-			guard(mutex)(&kbdlight_mutex);
-
-			/*
-			 * Check the brightness actually changed, setting the brightness
-			 * through kbdlight_set_level() also triggers this event.
-			 */
-			brightness = kbdlight_sysfs_get(NULL);
-			if (kbdlight_brightness != brightness) {
-				kbdlight_brightness = brightness;
-				led_classdev_notify_brightness_hw_changed(
-					&tpacpi_led_kbdlight.led_classdev, brightness);
-			}
-		}
+		if (tp_features.kbdlight)
+			kbdlight_notify_change();
 		/* Key events are suppressed by default hotkey_user_mask */
 		return false;
 	case TP_HKEY_EV_DFR_CHANGE_ROW:
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v6 3/6] platform/x86: thinkpad_acpi: Don't poke keyboard backlight's LED core brightness
  2026-12-03 12:06 [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
  2026-12-03 12:06 ` [PATCH v6 1/6] platform/x86: thinkpad_acpi: Report auto keyboard backlight mode as off Qiling Zhu
  2026-12-03 12:07 ` [PATCH v6 2/6] platform/x86: thinkpad_acpi: Extract kbdlight notify helpers Qiling Zhu
@ 2026-12-03 12:07 ` Qiling Zhu
  2026-12-03 12:07 ` [PATCH v6 4/6] platform/x86: thinkpad_acpi: Restore keyboard backlight level ourselves Qiling Zhu
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Qiling Zhu @ 2026-12-03 12:07 UTC (permalink / raw)
  To: Mark Pearson, Derek J. Clark, Rong Zhang, Hans de Goede,
	Ilpo Järvinen, Henrique de Moraes Holschuh
  Cc: platform-driver-x86, linux-kernel, ibm-acpi-devel, Lee Jones,
	Pavel Machek, Griffin Kroah-Hartman, linux-leds, vishnuocv,
	vsankar, Andrea Rabbaglietti

A write to /proc/acpi/ibm/kbdlight writes the EC level and updates the
cached level under kbdlight_mutex, but then assigns led_cdev->brightness
directly after releasing the lock, without telling the LED core.
Commit 06da5325d02e ("platform/x86: thinkpad_acpi: Stop setting
led_classdev brightness directly") already removed this pattern from the
sysfs path but had to keep it for the proc interface, which has no LED
core path of its own.

Stop writing to that cache.  kbdlight_set_level_and_update() now only
writes the EC level and updates the cached level, under kbdlight_mutex;
the sysfs path uses it, as a write that already goes through the LED core
does not need to be reported back to it.  The proc write path instead
calls kbdlight_notify_level(), which updates the cached level and reports
the new one through brightness_hw_changed, like commit 07f48f668fac
("platform/x86: ideapad-laptop: add FnLock LED class device") did for
the ideapad FnLock LED.

Signed-off-by: Qiling Zhu <kmatzkaczor244@gmail.com>
Reviewed-by: Rong Zhang <i@rong.moe>

---
After a procfs write, led_cdev->brightness can retain its previous
value.  This is acceptable:

- Reading the brightness attribute calls brightness_get(), which reads
  the level back from the EC and refreshes the cache.
- At this point in the series, kbdlight_suspend() also refreshes the
  cache before suspend, so led_classdev_resume() does not write a stale
  value back.
- Software blinking may pick up the old value as its "on" level, as it
  can after a Fn+Space change.
---
 drivers/platform/x86/lenovo/thinkpad_acpi.c | 44 ++++++++++++---------
 1 file changed, 26 insertions(+), 18 deletions(-)

diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index 3ef857542..80601ed2c 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -5113,12 +5113,11 @@ static int kbdlight_set_level(int level)
 	if (!hkey_handle)
 		return -ENXIO;
 
-	guard(mutex)(&kbdlight_mutex);
+	lockdep_assert_held(&kbdlight_mutex);
 
 	if (!acpi_evalf(hkey_handle, NULL, "MLCS", "dd", level))
 		return -EIO;
 
-	kbdlight_brightness = level;
 	return 0;
 }
 
@@ -5147,6 +5146,21 @@ static int kbdlight_level_to_brightness(int level)
 	return level;
 }
 
+static int kbdlight_set_level_and_update(int level)
+{
+	int ret;
+
+	guard(mutex)(&kbdlight_mutex);
+
+	ret = kbdlight_set_level(level);
+	if (ret)
+		return ret;
+
+	kbdlight_brightness = level;
+
+	return 0;
+}
+
 static bool kbdlight_is_supported(void)
 {
 	int status = 0;
@@ -5195,7 +5209,7 @@ static bool kbdlight_is_supported(void)
 static int kbdlight_sysfs_set(struct led_classdev *led_cdev,
 			enum led_brightness brightness)
 {
-	return kbdlight_set_level(brightness);
+	return kbdlight_set_level_and_update(brightness);
 }
 
 static enum led_brightness kbdlight_sysfs_get(struct led_classdev *led_cdev)
@@ -5253,20 +5267,6 @@ static void kbdlight_exit(void)
 	led_classdev_unregister(&tpacpi_led_kbdlight.led_classdev);
 }
 
-static int kbdlight_set_level_and_update(int level)
-{
-	int ret;
-	struct led_classdev *led_cdev;
-
-	ret = kbdlight_set_level(level);
-	led_cdev = &tpacpi_led_kbdlight.led_classdev;
-
-	if (ret == 0 && !(led_cdev->flags & LED_SUSPENDED))
-		led_cdev->brightness = level;
-
-	return ret;
-}
-
 static void kbdlight_notify_level(int level)
 {
 	struct led_classdev *led_cdev = &tpacpi_led_kbdlight.led_classdev;
@@ -5332,7 +5332,15 @@ static int kbdlight_write(char *buf)
 	if (level >= 3 || level < 0)
 		return -EINVAL;
 
-	return kbdlight_set_level_and_update(level);
+	guard(mutex)(&kbdlight_mutex);
+
+	res = kbdlight_set_level(level);
+	if (res)
+		return res;
+
+	kbdlight_notify_level(level);
+
+	return 0;
 }
 
 static void kbdlight_suspend(void)
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v6 4/6] platform/x86: thinkpad_acpi: Restore keyboard backlight level ourselves
  2026-12-03 12:06 [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
                   ` (2 preceding siblings ...)
  2026-12-03 12:07 ` [PATCH v6 3/6] platform/x86: thinkpad_acpi: Don't poke keyboard backlight's LED core brightness Qiling Zhu
@ 2026-12-03 12:07 ` Qiling Zhu
  2026-12-03 12:50   ` sashiko-bot
  2026-12-03 12:07 ` [PATCH v6 5/6] platform/x86: thinkpad_acpi: Detect auto-mode capability via MLCG Qiling Zhu
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Qiling Zhu @ 2026-12-03 12:07 UTC (permalink / raw)
  To: Mark Pearson, Derek J. Clark, Rong Zhang, Hans de Goede,
	Ilpo Järvinen, Henrique de Moraes Holschuh
  Cc: platform-driver-x86, linux-kernel, ibm-acpi-devel, Lee Jones,
	Pavel Machek, Griffin Kroah-Hartman, linux-leds, vishnuocv,
	vsankar, Andrea Rabbaglietti

kbdlight_suspend() and kbdlight_resume() leave the keyboard backlight to
the LED core across sleep: the LED core caches the current brightness
and turns the backlight off on suspend, and writes that brightness back
on resume.

On a ThinkPad X1 Carbon Gen 14 with thinkpad_acpi unloaded, the firmware
turned the backlight off when entering both s2idle and hibernation.
After waking from s2idle the EC was back at its previous level, for each
of the four levels tested; after waking from hibernation it was at 0.

Drop kbdlight_suspend() and leave turning the backlight off to the
firmware.  On resume, write the cached level back to the EC on all
models, instead of relying on the LED core: this brings the backlight
back where the firmware came up with it off, and changes nothing
where the EC already has that level.  For this to hold for every
mode, have kbdlight_brightness track the EC level itself, 0 to 3,
rather than the brightness reported to the LED core, in which the auto
mode (level 3) shows up as 0.  kbdlight_init() accordingly reads the
level from the EC instead of the brightness; the notify helpers already
work in terms of EC levels.

Only s2idle and S4 were available on the test machine; S3-capable
models were not tested.

Signed-off-by: Qiling Zhu <kmatzkaczor244@gmail.com>
Reviewed-by: Rong Zhang <i@rong.moe>
---
 drivers/platform/x86/lenovo/thinkpad_acpi.c | 28 +++++++++------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index 80601ed2c..764b1efa6 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -5105,7 +5105,12 @@ static struct ibm_struct video_driver_data = {
 /* EC level that selects the auto mode for the keyboard backlight */
 #define TPACPI_KBD_LIGHT_AUTO_LEVEL 3
 
-static enum led_brightness kbdlight_brightness;
+/*
+ * Cached EC level, including TPACPI_KBD_LIGHT_AUTO_LEVEL.  All state
+ * tracking compares EC levels; the auto mode is translated to a
+ * brightness value only when reporting to the LED core.
+ */
+static int kbdlight_brightness;
 static DEFINE_MUTEX(kbdlight_mutex);
 
 static int kbdlight_set_level(int level)
@@ -5247,7 +5252,10 @@ static int __init kbdlight_init(struct ibm_init_struct *iibm)
 		return -ENODEV;
 	}
 
-	kbdlight_brightness = kbdlight_sysfs_get(NULL);
+	kbdlight_brightness = kbdlight_get_level();
+	if (kbdlight_brightness < 0)
+		kbdlight_brightness = 0;
+
 	tp_features.kbdlight = 1;
 
 	rc = led_classdev_register(&tpacpi_pdev->dev,
@@ -5343,31 +5351,19 @@ static int kbdlight_write(char *buf)
 	return 0;
 }
 
-static void kbdlight_suspend(void)
-{
-	struct led_classdev *led_cdev;
-
-	if (!tp_features.kbdlight)
-		return;
-
-	led_cdev = &tpacpi_led_kbdlight.led_classdev;
-	led_update_brightness(led_cdev);
-	led_classdev_suspend(led_cdev);
-}
-
 static void kbdlight_resume(void)
 {
 	if (!tp_features.kbdlight)
 		return;
 
-	led_classdev_resume(&tpacpi_led_kbdlight.led_classdev);
+	guard(mutex)(&kbdlight_mutex);
+	kbdlight_set_level(kbdlight_brightness);
 }
 
 static struct ibm_struct kbdlight_driver_data = {
 	.name = "kbdlight",
 	.read = kbdlight_read,
 	.write = kbdlight_write,
-	.suspend = kbdlight_suspend,
 	.resume = kbdlight_resume,
 	.exit = kbdlight_exit,
 };
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v6 5/6] platform/x86: thinkpad_acpi: Detect auto-mode capability via MLCG
  2026-12-03 12:06 [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
                   ` (3 preceding siblings ...)
  2026-12-03 12:07 ` [PATCH v6 4/6] platform/x86: thinkpad_acpi: Restore keyboard backlight level ourselves Qiling Zhu
@ 2026-12-03 12:07 ` Qiling Zhu
  2026-12-03 12:07 ` [PATCH v6 6/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
  2026-12-03 12:50 ` [PATCH v6 0/6] " sashiko-bot
  6 siblings, 0 replies; 10+ messages in thread
From: Qiling Zhu @ 2026-12-03 12:07 UTC (permalink / raw)
  To: Mark Pearson, Derek J. Clark, Rong Zhang, Hans de Goede,
	Ilpo Järvinen, Henrique de Moraes Holschuh
  Cc: platform-driver-x86, linux-kernel, ibm-acpi-devel, Lee Jones,
	Pavel Machek, Griffin Kroah-Hartman, linux-leds, vishnuocv,
	vsankar, Andrea Rabbaglietti

MLCG bit 20 indicates whether the EC supports the auto mode of the
keyboard backlight (0 = manual levels only, 1 = auto mode available), as
defined by the firmware.

Record it in tp_features.kbdlight_auto, for use when registering the
auto-mode trigger in a subsequent change.

Link: https://lore.kernel.org/r/CABxCQKuEP5wMSstO0MK1MhaqXTKrPhUSN3V2mrE_42j4cXsXZQ@mail.gmail.com
Signed-off-by: Qiling Zhu <kmatzkaczor244@gmail.com>
Reviewed-by: Rong Zhang <i@rong.moe>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
---
 drivers/platform/x86/lenovo/thinkpad_acpi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index 764b1efa6..8f73f87e9 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -363,6 +363,7 @@ static struct {
 		TP_HOTKEY_TABLET_USES_GMMS,
 	} hotkey_tablet;
 	u32 kbdlight:1;
+	u32 kbdlight_auto:1;
 	u32 light:1;
 	u32 light_status:1;
 	u32 bright_acpimode:1;
@@ -5105,6 +5106,9 @@ static struct ibm_struct video_driver_data = {
 /* EC level that selects the auto mode for the keyboard backlight */
 #define TPACPI_KBD_LIGHT_AUTO_LEVEL 3
 
+/* MLCG bit that indicates whether the EC supports the auto mode */
+#define TPACPI_KBD_LIGHT_AUTO_CAPABLE_BIT BIT(20)
+
 /*
  * Cached EC level, including TPACPI_KBD_LIGHT_AUTO_LEVEL.  All state
  * tracking compares EC levels; the auto mode is translated to a
@@ -5189,6 +5193,9 @@ static bool kbdlight_is_supported(void)
 	}
 
 	vdbg_printk(TPACPI_DBG_INIT, "kbdlight MLCG returned 0x%x\n", status);
+
+	tp_features.kbdlight_auto = !!(status & TPACPI_KBD_LIGHT_AUTO_CAPABLE_BIT);
+
 	/*
 	 * Guessed test for keyboard backlight:
 	 *
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v6 6/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger
  2026-12-03 12:06 [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
                   ` (4 preceding siblings ...)
  2026-12-03 12:07 ` [PATCH v6 5/6] platform/x86: thinkpad_acpi: Detect auto-mode capability via MLCG Qiling Zhu
@ 2026-12-03 12:07 ` Qiling Zhu
  2026-12-03 12:50   ` sashiko-bot
  2026-12-03 12:50 ` [PATCH v6 0/6] " sashiko-bot
  6 siblings, 1 reply; 10+ messages in thread
From: Qiling Zhu @ 2026-12-03 12:07 UTC (permalink / raw)
  To: Mark Pearson, Derek J. Clark, Rong Zhang, Hans de Goede,
	Ilpo Järvinen, Henrique de Moraes Holschuh
  Cc: platform-driver-x86, linux-kernel, ibm-acpi-devel, Lee Jones,
	Pavel Machek, Griffin Kroah-Hartman, linux-leds, vishnuocv,
	vsankar, Andrea Rabbaglietti

On ThinkPads that advertise the auto mode in MLCG bit 20, expose EC
level 3 as a private LED trigger named "tpacpi-kbd-auto".  Select
LEDS_TRIGGERS so that the trigger is available in stripped-down
configurations.  If registering the trigger fails, register the
keyboard backlight LED as before.

Activating the trigger writes EC level 3 and records it in the cached
level; whether the LED is hardware-controlled is derived from that
cached level, so reading brightness returns -ENODATA while the trigger
is active and the EC is in auto mode.  If the EC is already in auto
mode when the driver loads, make the trigger the default one, to
reflect a selection made before the driver was loaded.

A sysfs brightness write leaves auto mode through the LED core's own
trigger removal.  With CONFIG_LEDS_TRIGGERS_HW_CHANGED enabled, the LED
core also switches between "none" and the trigger in response to
Fn+Space, or to a procfs write that leaves auto mode.

Deliberately unchanged: max_brightness stays 2.

Signed-off-by: Qiling Zhu <kmatzkaczor244@gmail.com>
Reviewed-by: Rong Zhang <i@rong.moe>
---
 drivers/platform/x86/lenovo/Kconfig         |  1 +
 drivers/platform/x86/lenovo/thinkpad_acpi.c | 60 +++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/drivers/platform/x86/lenovo/Kconfig b/drivers/platform/x86/lenovo/Kconfig
index 516594993..77d159a3a 100644
--- a/drivers/platform/x86/lenovo/Kconfig
+++ b/drivers/platform/x86/lenovo/Kconfig
@@ -83,6 +83,7 @@ config THINKPAD_ACPI
 	select NVRAM
 	select NEW_LEDS
 	select LEDS_CLASS
+	select LEDS_TRIGGERS
 	select INPUT_SPARSEKMAP
 	help
 	  This is a driver for the IBM and Lenovo ThinkPad laptops. It adds
diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index 8f73f87e9..af53117d5 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -5218,6 +5218,27 @@ static bool kbdlight_is_supported(void)
 	return status & BIT(9);
 }
 
+static struct led_hw_trigger_type kbdlight_auto_trigger_type;
+
+static int kbdlight_auto_trigger_activate(struct led_classdev *led_cdev)
+{
+	return kbdlight_set_level_and_update(TPACPI_KBD_LIGHT_AUTO_LEVEL);
+}
+
+static bool kbdlight_auto_trigger_hw_offloaded(struct led_classdev *led_cdev)
+{
+	guard(mutex)(&kbdlight_mutex);
+
+	return kbdlight_brightness == TPACPI_KBD_LIGHT_AUTO_LEVEL;
+}
+
+static struct led_trigger kbdlight_auto_trigger = {
+	.name		= "tpacpi-kbd-auto",
+	.trigger_type	= &kbdlight_auto_trigger_type,
+	.activate	= kbdlight_auto_trigger_activate,
+	.hw_offloaded	= kbdlight_auto_trigger_hw_offloaded,
+};
+
 static int kbdlight_sysfs_set(struct led_classdev *led_cdev,
 			enum led_brightness brightness)
 {
@@ -5245,6 +5266,35 @@ static struct tpacpi_led_classdev tpacpi_led_kbdlight = {
 	}
 };
 
+static void __init kbdlight_init_auto_trigger(void)
+{
+	struct led_classdev *led_cdev = &tpacpi_led_kbdlight.led_classdev;
+	int rc;
+
+	rc = devm_led_trigger_register(&tpacpi_pdev->dev, &kbdlight_auto_trigger);
+	if (rc) {
+		/*
+		 * Auto-mode trigger unavailable; basic backlight
+		 * control keeps working.
+		 */
+		dev_warn(&tpacpi_pdev->dev, "auto-mode trigger unavailable\n");
+		return;
+	}
+
+	led_cdev->flags |= LED_TRIG_HW_CHANGED;
+	led_cdev->trigger_type = &kbdlight_auto_trigger_type;
+	led_cdev->hw_control_trigger = kbdlight_auto_trigger.name;
+
+	/*
+	 * The EC does not keep the level across boots, but it may already
+	 * be in auto mode when the driver loads: Fn+Space works at the
+	 * BIOS or disk-encryption prompt, and while the module is
+	 * unloaded.  Sync the initial trigger state with the EC then.
+	 */
+	if (kbdlight_brightness == TPACPI_KBD_LIGHT_AUTO_LEVEL)
+		led_cdev->default_trigger = kbdlight_auto_trigger.name;
+}
+
 static int __init kbdlight_init(struct ibm_init_struct *iibm)
 {
 	int rc;
@@ -5265,6 +5315,9 @@ static int __init kbdlight_init(struct ibm_init_struct *iibm)
 
 	tp_features.kbdlight = 1;
 
+	if (tp_features.kbdlight_auto)
+		kbdlight_init_auto_trigger();
+
 	rc = led_classdev_register(&tpacpi_pdev->dev,
 				   &tpacpi_led_kbdlight.led_classdev);
 	if (rc < 0) {
@@ -5285,6 +5338,7 @@ static void kbdlight_exit(void)
 static void kbdlight_notify_level(int level)
 {
 	struct led_classdev *led_cdev = &tpacpi_led_kbdlight.led_classdev;
+	bool was_auto, is_auto;
 
 	lockdep_assert_held(&kbdlight_mutex);
 
@@ -5295,6 +5349,12 @@ static void kbdlight_notify_level(int level)
 	if (level == kbdlight_brightness)
 		return;
 
+	was_auto = kbdlight_brightness == TPACPI_KBD_LIGHT_AUTO_LEVEL;
+	is_auto = level == TPACPI_KBD_LIGHT_AUTO_LEVEL;
+
+	if (is_auto != was_auto && led_cdev->hw_control_trigger)
+		led_trigger_notify_hw_control_changed(led_cdev, is_auto);
+
 	kbdlight_brightness = level;
 	led_classdev_notify_brightness_hw_changed(led_cdev, kbdlight_level_to_brightness(level));
 }
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v6 4/6] platform/x86: thinkpad_acpi: Restore keyboard backlight level ourselves
  2026-12-03 12:07 ` [PATCH v6 4/6] platform/x86: thinkpad_acpi: Restore keyboard backlight level ourselves Qiling Zhu
@ 2026-12-03 12:50   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-12-03 12:50 UTC (permalink / raw)
  To: Qiling Zhu; +Cc: linux-leds, lee

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Medium] platform/x86: thinkpad_acpi: dropping kbdlight_suspend()
  leaves backlight on
- [Medium] platform/x86: thinkpad_acpi: kbdlight_resume() writes stale
  cached EC level
- [Medium] platform/x86: thinkpad_acpi: unquiesced kbdlight work during
  sleep
- [Low] platform/x86: thinkpad_acpi: HKEY notify can clobber
  kbdlight_brightness
--

commit 0004fa8e5cc196a98da2ae4e21a488719717aed0
Author: Qiling Zhu <kmatzkaczor244@gmail.com>

platform/x86: thinkpad_acpi: Restore keyboard backlight level ourselves

This commit drops kbdlight_suspend() so firmware handles turning off the
keyboard backlight during sleep, changes kbdlight_brightness to track
raw EC levels (0 to 3), and writes kbdlight_brightness directly back to
the EC in kbdlight_resume().

> diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> index 80601ed2cfc16..764b1efa66fa2 100644
> --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c

[ ... ]

> @@ -5343,31 +5351,19 @@ static int kbdlight_write(char *buf)
>  	return 0;
>  }
>  
> -static void kbdlight_suspend(void)
> -{
> -	struct led_classdev *led_cdev;
> -
> -	if (!tp_features.kbdlight)
> -		return;
> -
> -	led_cdev = &tpacpi_led_kbdlight.led_classdev;
> -	led_update_brightness(led_cdev);
> -	led_classdev_suspend(led_cdev);
> -}
> -

[Severity: Medium]
Can removing kbdlight_suspend() leave the keyboard backlight powered on
during sleep on non-LPS0 ThinkPads?

tpacpi_led_kbdlight.led_classdev does not set LED_CORE_SUSPENDRESUME, so
thinkpad_acpi now relies entirely on firmware to turn the backlight off.

On older S3-only ThinkPads, dual-mode models set to S3 in BIOS, or
systems with acpi.sleep_no_lps0=1, acpi_s2idle_prepare_late_lps0()
returns early without notifying firmware or the EC during s2idle.  The
backlight then stays on and drains the battery for the whole sleep.

Keeping kbdlight_suspend() to save the raw EC level and turn the
backlight off without clobbering the saved level would preserve auto
mode without regressing non-LPS0 s2idle or untested S3 models.

[Severity: Medium]
Does dropping led_classdev_suspend() leave set_brightness_work
unquiesced across suspend and hibernation?

tpacpi_led_kbdlight uses brightness_set_blocking, which runs
set_brightness_work on leds_wq (allocated without WQ_FREEZABLE).
Without LED_SUSPENDED gating and flush_work() from
led_classdev_suspend(), pending writes or LED triggers keep running:

CPU0                              kworker (leds_wq)
acpi_pm_freeze()
  acpi_ec_block_transactions()
                                  set_brightness_delayed()
                                    kbdlight_sysfs_set()
                                      kbdlight_set_level_and_update()
                                        kbdlight_set_level()  <-- -EIO

Because kbdlight_set_level_and_update() returns early on error without
updating kbdlight_brightness, the pre-suspend brightness change is lost
on resume alongside ACPI and LED error logs.

During s2idle, unquiesced work or an active LED trigger running after
acpi_s2idle_prepare_late_lps0() can also turn the backlight back on
after firmware turned it off.

>  static void kbdlight_resume(void)
>  {
>  	if (!tp_features.kbdlight)
>  		return;
>  
> -	led_classdev_resume(&tpacpi_led_kbdlight.led_classdev);
> +	guard(mutex)(&kbdlight_mutex);
> +	kbdlight_set_level(kbdlight_brightness);
>  }

[Severity: Medium]
Can kbdlight_resume() overwrite the live EC level with a stale
kbdlight_brightness now that kbdlight_suspend() no longer refreshes it?

Previously, led_update_brightness() read the live EC level before sleep.
Without that refresh, kbdlight_brightness can drift: when
TP_ACPI_HKEY_KBD_LIGHT_MASK is set in hotkey_source_mask,
hotkey_notify_hotkey() drops TP_HKEY_EV_KBD_LIGHT events.

kbdlight_resume() then writes the stale cached level back to the EC,
changing the backlight unexpectedly even on s2idle systems where the EC
preserved the real pre-suspend level.

Refreshing kbdlight_brightness from kbdlight_get_level() under
kbdlight_mutex during suspend would keep it accurate for all modes.

[Severity: Low]
Can an ACPI TP_HKEY_EV_KBD_LIGHT notification during sleep entry or
early resume clobber kbdlight_brightness before kbdlight_resume() runs?

Previously, kbdlight_suspend() saved the pre-sleep level in
led_cdev->brightness, while kbdlight_notify_change() only updated
kbdlight_brightness.  Now kbdlight_brightness is both the live hotkey
cache and the saved pre-sleep state.

kacpi_notify_wq is not WQ_FREEZABLE, and acpi_pm_finish() re-enables
runtime GPEs and executes _WAK before dpm_resume() runs
tpacpi_resume_handler() (where hotkey_resume() also runs before
kbdlight_resume()):

CPU0                              kworker (kacpi_notify_wq)
acpi_pm_finish()
  acpi_hw_legacy_wake()
    acpi_hw_enable_all_runtime_gpes()
                                  dispatch_acpi_notify()
                                    kbdlight_notify_change()
                                      kbdlight_get_level() -> 0
                                      kbdlight_brightness = 0  <-- clobbers
dpm_resume()
  kbdlight_resume()
    kbdlight_set_level(0)

If firmware emits TP_HKEY_EV_KBD_LIGHT while the backlight is 0 during
sleep entry or early resume, kbdlight_resume() restores 0 instead of the
pre-sleep level and emits a spurious brightness_hw_changed(0) event.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203120704.41431-1-kmatzkaczor244@gmail.com?part=4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v6 6/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger
  2026-12-03 12:07 ` [PATCH v6 6/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
@ 2026-12-03 12:50   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-12-03 12:50 UTC (permalink / raw)
  To: Qiling Zhu; +Cc: linux-leds, lee

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] platform/x86: thinkpad_acpi: kbdlight_auto_trigger_activate()
  races EC state
- [Medium] platform/x86: thinkpad_acpi: sysfs brightness write clobbered
  by auto trigger
--

commit 530265d2e67f80c165f57650f253fcb8bc085f3d
Author: Qiling Zhu <kmatzkaczor244@gmail.com>

platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger

This commit exposes ThinkPad keyboard backlight auto mode (EC level 3) as a
private LED trigger named "tpacpi-kbd-auto" and wires hardware transitions to
led_trigger_notify_hw_control_changed().

> diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> index 8f73f87e929dc..af53117d554c6 100644
> --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> @@ -5218,6 +5218,27 @@ static bool kbdlight_is_supported(void)
>  	return status & BIT(9);
>  }
>  
> +static struct led_hw_trigger_type kbdlight_auto_trigger_type;
> +
> +static int kbdlight_auto_trigger_activate(struct led_classdev *led_cdev)
> +{
> +	return kbdlight_set_level_and_update(TPACPI_KBD_LIGHT_AUTO_LEVEL);
> +}

[Severity: Medium]
Can kbdlight_auto_trigger_activate() revert a newer hardware transition and
desynchronize the trigger from the EC?

When Fn+Space cycles rapidly past auto mode (level 2 -> 3 -> 0), the first
kbdlight_notify_level(3) queues trigger_hw_changed_work with activate = true.
__led_trigger_set() then blocks in synchronize_rcu() before calling
kbdlight_auto_trigger_activate(), opening a multi-millisecond window:

kworker                            ACPI notify (Fn+Space)
led_trigger_hw_control_changed_worker()
  activate = true
  __led_trigger_set(..., trig, true)
    led_cdev->trigger = trig
    synchronize_rcu()
                                   kbdlight_notify_level(0)
                                     led_trigger_notify_hw_control_changed(
                                       ..., false)
                                     kbdlight_brightness = 0
    kbdlight_auto_trigger_activate()
      MLCS(3); kbdlight_brightness = 3  <-- reverts EC to auto mode
led_trigger_hw_control_changed_worker()
  activate = false
  __led_trigger_set(..., NULL, true)    <-- detaches trigger, EC stays at 3

The resulting MLCS(3) EC echo is ignored by kbdlight_notify_level() because
kbdlight_brightness is already 3, and __led_trigger_set(..., NULL, true)
skips turning off the LED when hw_triggered is true.  The user's second
Fn+Space press is reverted, leaving the EC and kbdlight_brightness stuck in
auto mode while sysfs trigger reports [none] and brightness reports 0 instead
of -ENODATA.

A concurrent sysfs trigger write to tpacpi-kbd-auto racing with a pending
activate = false worker can similarly detach the trigger while leaving the EC
in auto mode.

[ ... ]

> @@ -5295,6 +5349,12 @@ static void kbdlight_notify_level(int level)
>  	if (level == kbdlight_brightness)
>  		return;
>  
> +	was_auto = kbdlight_brightness == TPACPI_KBD_LIGHT_AUTO_LEVEL;
> +	is_auto = level == TPACPI_KBD_LIGHT_AUTO_LEVEL;
> +
> +	if (is_auto != was_auto && led_cdev->hw_control_trigger)
> +		led_trigger_notify_hw_control_changed(led_cdev, is_auto);
> +
>  	kbdlight_brightness = level;
>  	led_classdev_notify_brightness_hw_changed(led_cdev, kbdlight_level_to_brightness(level));
>  }

[Severity: Medium]
What happens if userspace writes a manual brightness to sysfs after
kbdlight_notify_level(3) queues trigger_hw_changed_work (and wakes listeners
via led_classdev_notify_brightness_hw_changed()), but before the worker
attaches kbdlight_auto_trigger?

userspace (sysfs brightness)      kworker
brightness_store(state)
  led_cdev->trigger == NULL
  led_set_brightness(..., state)
                                  set_brightness_work:
                                    kbdlight_sysfs_set(state)
                                      kbdlight_set_level_and_update(state)
                                  led_trigger_hw_control_changed_worker()
                                    activate = true
                                    __led_trigger_set(..., trig, true)
                                      flush_work(&set_brightness_work)
                                      kbdlight_auto_trigger_activate()
                                        <-- overwrites EC back to level 3

Because led_cdev->trigger is still NULL during brightness_store(),
led_trigger_remove() / led_trigger_remove_hw_control() is a no-op and does
not clear trigger_hw_changed.  kbdlight_set_level_and_update() does not call
led_trigger_notify_hw_control_changed(led_cdev, false) either, and the EC
echo is ignored because level == kbdlight_brightness.

When the worker runs, flush_work(&led_cdev->set_brightness_work) ensures the
manual write completes first, and kbdlight_auto_trigger_activate() then
silently overwrites the sysfs brightness write back to EC level 3 with
tpacpi-kbd-auto attached.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203120704.41431-1-kmatzkaczor244@gmail.com?part=6

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger
  2026-12-03 12:06 [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
                   ` (5 preceding siblings ...)
  2026-12-03 12:07 ` [PATCH v6 6/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
@ 2026-12-03 12:50 ` sashiko-bot
  6 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-12-03 12:50 UTC (permalink / raw)
  To: Qiling Zhu; +Cc: linux-leds, lee

Sashiko has finished reviewing this 6-patch series:

- Patches 1-3 and 5: no issues found.
- Patch 4 ("platform/x86: thinkpad_acpi: Restore keyboard backli..."): 4
  potential issues (3 Medium, 1 Low)
- Patch 6 ("platform/x86: thinkpad_acpi: Add a keyboard backligh..."): 2
  potential issues (2 Medium)

Detailed reviews have been sent as separate replies to patches 4 and 6.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203120704.41431-1-kmatzkaczor244@gmail.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-12-03 12:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 12:06 [PATCH v6 0/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
2026-12-03 12:06 ` [PATCH v6 1/6] platform/x86: thinkpad_acpi: Report auto keyboard backlight mode as off Qiling Zhu
2026-12-03 12:07 ` [PATCH v6 2/6] platform/x86: thinkpad_acpi: Extract kbdlight notify helpers Qiling Zhu
2026-12-03 12:07 ` [PATCH v6 3/6] platform/x86: thinkpad_acpi: Don't poke keyboard backlight's LED core brightness Qiling Zhu
2026-12-03 12:07 ` [PATCH v6 4/6] platform/x86: thinkpad_acpi: Restore keyboard backlight level ourselves Qiling Zhu
2026-12-03 12:50   ` sashiko-bot
2026-12-03 12:07 ` [PATCH v6 5/6] platform/x86: thinkpad_acpi: Detect auto-mode capability via MLCG Qiling Zhu
2026-12-03 12:07 ` [PATCH v6 6/6] platform/x86: thinkpad_acpi: Add a keyboard backlight auto-mode trigger Qiling Zhu
2026-12-03 12:50   ` sashiko-bot
2026-12-03 12:50 ` [PATCH v6 0/6] " sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox