Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform: arm64: thinkpad-t14s-ec: add suspend handler for keyboard backlight

This ensures that the keyboard backlight state is restored after
a suspend-resume cycle. Otherwise the keyboard is automatically
disabled during suspend and then stays disabled after resume.

Note, that this adopts the same behavior as the existing Thinkpad
ACPI driver.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Link: https://patch.msgid.link/20251119-thinkpad-t14s-ec-improvements-v2-4-441219857c02@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Sebastian Reichel and committed by
Ilpo Järvinen
3c79c2e2 fc62cb6a

+4
+4
drivers/platform/arm64/lenovo-thinkpad-t14s.c
··· 606 606 { 607 607 struct t14s_ec *ec = dev_get_drvdata(dev); 608 608 609 + led_classdev_suspend(&ec->kbd_backlight); 610 + 609 611 t14s_ec_write_sequence(ec, T14S_EC_REG_MODERN_STANDBY, 610 612 T14S_EC_MODERN_STANDBY_ENTRY, 3); 611 613 ··· 620 618 621 619 t14s_ec_write_sequence(ec, T14S_EC_REG_MODERN_STANDBY, 622 620 T14S_EC_MODERN_STANDBY_EXIT, 3); 621 + 622 + led_classdev_resume(&ec->kbd_backlight); 623 623 624 624 return 0; 625 625 }