[PATCH 0/1] platform/x86: Add Lenovo Legion WMI Drivers

From: Derek J. Clark
Date: Tue Dec 17 2024 - 18:07:09 EST


Adds support for the Lenovo Legion series of laptop hardware to use WMI
interfaces that control various power settings. There are multiple WMI
interfaces that work in concert to provide getting and setting values as
well as validation of input. Currently only the "GameZone", "Other
Method", and "LENOVO_CAPABILITY_DATA_01" interfaces are implemented, but
I attempted to structure the driver so that adding the "Custom Mode",
"Lighting", and the other CAPABILITY_DATA interfaces would be trivial if
desired in a later patch.

This driver is distinct from, but should be considered a replacement for
this patch:
https://lore.kernel.org/all/20241118100503.14228-1-jonmail@xxxxxxx/

This driver attempts to standardize the exposed sysfs by mirroring the
asus-armoury driver currently under review. As such, a lot of
inspiration has been drawn from that driver.
https://lore.kernel.org/all/20240930000046.51388-1-luke@xxxxxxxxxx/

The driver has been tested by me on the Lenovo Legion Go.

Suggested-by: Mario Limonciello <superm1@xxxxxxxxxx>
Reviewed-by: Luke Jones <luke@xxxxxxxxxx>
Signed-off-by: Derek J. Clark <derekjohn.clark@xxxxxxxxx>

Derek J. Clark (1):
Add lenovo-legion-wmi drivers

.../wmi/devices/lenovo-legion-wmi.rst | 79 ++++
MAINTAINERS | 9 +
drivers/platform/x86/Kconfig | 35 ++
drivers/platform/x86/Makefile | 21 +-
.../x86/lenovo-legion-wmi-capdata01.c | 103 +++++
.../platform/x86/lenovo-legion-wmi-gamezone.c | 233 +++++++++++
.../platform/x86/lenovo-legion-wmi-other.c | 377 ++++++++++++++++++
drivers/platform/x86/lenovo-legion-wmi.h | 271 +++++++++++++
8 files changed, 1119 insertions(+), 9 deletions(-)
create mode 100644 Documentation/wmi/devices/lenovo-legion-wmi.rst
create mode 100644 drivers/platform/x86/lenovo-legion-wmi-capdata01.c
create mode 100644 drivers/platform/x86/lenovo-legion-wmi-gamezone.c
create mode 100644 drivers/platform/x86/lenovo-legion-wmi-other.c
create mode 100644 drivers/platform/x86/lenovo-legion-wmi.h

--
2.47.0