platform/x86: lenovo-yogabook: Use PMIC LED driver for pen icon LED control
authorHans de Goede <hdegoede@redhat.com>
Sun, 30 Apr 2023 16:57:57 +0000 (18:57 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 9 May 2023 10:29:51 +0000 (12:29 +0200)
commit76d6778fb21ee5e86b1de102d12b6480fa4fad9e
tree6cfd6ed49bd8399101881f1ba5e810fd8dc765ad
parenta6673cfc6b56a2dc41de416f5ea397943297b79a
platform/x86: lenovo-yogabook: Use PMIC LED driver for pen icon LED control

Use the (new) PMIC LED driver for pen icon LED control instead of using
custom WMI calls for this.

This will also work on the Android version of the Lenovo Yoga Book 1,
where there is no WMI interface for this.

The dev_id of the lookup is set using dev_name() so that it will also
work for both the Windows YB1 WMI-device as well as the Android YB1
platform-device. While at it also move the gpio_lookup to using dev_name()
for the dev_id.

Note this also removes the need to turn of the LED during suspend since
the PMIC LED driver now already does that.

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