diff mbox series

platform/x86: thinkpad_acpi: Add charging indicator to the list of safe LEDs

Message ID 20250403040846.7834-1-martin@arp242.net (mailing list archive)
State New
Headers show
Series platform/x86: thinkpad_acpi: Add charging indicator to the list of safe LEDs | expand

Commit Message

Martin Tournoij April 3, 2025, 4:08 a.m. UTC
Add "tpacpi:orange:batt" and "tpacpi:green:batt" to the list of safe
LEDs. These LEDs are next to the charging port and indicate the status:
"tpacpi:orange:batt" when charging the battery, and "tpacpi:green:batt"
when it's near full (typically white these days, not green).

I don't see why it would be unsafe to enable/disable these LEDs: the
only thing you lose is a LED telling you if the battery is charging or
full. These indicators are informational and not critical

I got a new x13 a few months ago; on my old x280 the firmware would
automatically turn off the light once charging stopped, but on more
recent models it always stays on unless I disable it. I need to compile
a custom kernel now just for that, which is rather a pain. So I would
like to propose to expose these options.

Tested on my x280 and x13 Gen 4 AMD.

Signed-off-by: Martin Tournoij <martin@arp242.net>
---
 drivers/platform/x86/thinkpad_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 0384cf311878..edf7c97aeef9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5518,7 +5518,7 @@  static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
 	"tpacpi::unknown_led3",
 	"tpacpi::thinkvantage",
 };
-#define TPACPI_SAFE_LEDS	0x1481U
+#define TPACPI_SAFE_LEDS	0x1487U
 
 static inline bool tpacpi_is_led_restricted(const unsigned int led)
 {