platform/x86: lenovo-yogabook: Add keyboard backlight control to platform driver
authorHans de Goede <hdegoede@redhat.com>
Sun, 30 Apr 2023 16:58:06 +0000 (18:58 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 9 May 2023 10:35:03 +0000 (12:35 +0200)
commitfc4f1d88bc6b1780b9c807fab0b79755e7996116
treef2b634edb4c613363478a3071d7c79b5fda0d393
parent6df1523fa0b7991ea9c8e2ef8f9a238b19309a5d
platform/x86: lenovo-yogabook: Add keyboard backlight control to platform driver

On the Android yb1-x90f/l models there is not ACPI method to control
the keyboard backlight brightness. Instead the second PWM controller
is exposed directly to the OS there.

Add support for controlling keyboard backlight brightness on the Android
model by using the PWM subsystem to directly control the PWM.

The Android model also requires explicitly turning the backlight off
on suspend, which on the Windows model was done automatically.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230430165807.472798-19-hdegoede@redhat.com
drivers/platform/x86/lenovo-yogabook-wmi.c