From: Sebastian Reichel Date: Wed, 19 Nov 2025 00:41:43 +0000 (+0100) Subject: platform: arm64: thinkpad-t14s-ec: add suspend handler for keyboard backlight X-Git-Tag: v6.19-rc1~42^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c79c2e28a24a86199fa83bb80dc1a1c33f996c5;p=thirdparty%2Flinux.git 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 Link: https://patch.msgid.link/20251119-thinkpad-t14s-ec-improvements-v2-4-441219857c02@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen --- diff --git a/drivers/platform/arm64/lenovo-thinkpad-t14s.c b/drivers/platform/arm64/lenovo-thinkpad-t14s.c index 4bebe7b3b2a8c..1569a0b2a0e76 100644 --- a/drivers/platform/arm64/lenovo-thinkpad-t14s.c +++ b/drivers/platform/arm64/lenovo-thinkpad-t14s.c @@ -606,6 +606,8 @@ static int t14s_ec_suspend(struct device *dev) { struct t14s_ec *ec = dev_get_drvdata(dev); + led_classdev_suspend(&ec->kbd_backlight); + t14s_ec_write_sequence(ec, T14S_EC_REG_MODERN_STANDBY, T14S_EC_MODERN_STANDBY_ENTRY, 3); @@ -619,6 +621,8 @@ static int t14s_ec_resume(struct device *dev) t14s_ec_write_sequence(ec, T14S_EC_REG_MODERN_STANDBY, T14S_EC_MODERN_STANDBY_EXIT, 3); + led_classdev_resume(&ec->kbd_backlight); + return 0; }