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.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
drivers/platform/arm64/lenovo-thinkpad-t14s.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/arm64/lenovo-thinkpad-t14s.c b/drivers/platform/arm64/lenovo-thinkpad-t14s.c
index 066074a1314b..82c3ad6b3ee3 100644
--- a/drivers/platform/arm64/lenovo-thinkpad-t14s.c
+++ b/drivers/platform/arm64/lenovo-thinkpad-t14s.c
@@ -609,6 +609,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);
@@ -622,6 +624,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;
}
--
2.51.0