[PATCH v3 0/4] platform/x86: Add Lenovo Gaming Series WMI Drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adds support for the Lenovo "Gaming Series" of laptop hardware that 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
Mode", and "LENOVO_CAPABILITY_DATA_01" interfaces are implemented, but
I attempted to structure the driver so that adding the "Custom Mode",
"Lighting", and other data block interfaces would be trivial in a later
patches.

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 drivers have been tested by me on the Lenovo Legion Go and Legion Go
S.

v3:
- Added notifier chain to Gamezone and Other Mode drivers.
- Added component framework to lenovo-wmi-other driver with
  lenovo-wmi-capdata01 acting as a component.
- Completed all suggestions from v2.
- Checkpatch produces CHECK complaints about the Other Mode macros
  reusing some variable names. This don't appear to create the condition
  it highlights in my testing.

v2:
https://lore.kernel.org/platform-driver-x86/20250102004854.14874-1-derekjohn.clark@xxxxxxxxx/t/#m9682cee65783ff3a9e927f2ad1f55c4cbfc37615
v1:
https://lore.kernel.org/platform-driver-x86/CAFqHKTna+kJpHLo5s4Fm1TmHcSSqSTr96JHDm0DJ0dxsZMkixA@xxxxxxxxxxxxxx/T/#t

Suggested-by: Mario Limonciello <superm1@xxxxxxxxxx>
Signed-off-by: Derek J. Clark <derekjohn.clark@xxxxxxxxx>
Derek J. Clark (4):
  platform/x86: Add lenovo-wmi drivers Documentation
  platform/x86: Add Lenovo Gamezone WMI Driver
  platform/x86: Add Lenovo Capability Data 01 WMI Driver
  platform/x86: Add Lenovo Other Mode WMI Driver

 .../wmi/devices/lenovo-wmi-gamezone.rst       | 355 +++++++++++
 .../wmi/devices/lenovo-wmi-other-method.rst   | 142 +++++
 MAINTAINERS                                   |  12 +
 drivers/platform/x86/Kconfig                  |  35 ++
 drivers/platform/x86/Makefile                 |   4 +
 drivers/platform/x86/lenovo-wmi-capdata01.c   | 140 +++++
 drivers/platform/x86/lenovo-wmi-gamezone.c    | 374 ++++++++++++
 drivers/platform/x86/lenovo-wmi-other.c       | 549 ++++++++++++++++++
 drivers/platform/x86/lenovo-wmi.c             |  77 +++
 drivers/platform/x86/lenovo-wmi.h             |  94 +++
 10 files changed, 1782 insertions(+)
 create mode 100644 Documentation/wmi/devices/lenovo-wmi-gamezone.rst
 create mode 100644 Documentation/wmi/devices/lenovo-wmi-other-method.rst
 create mode 100644 drivers/platform/x86/lenovo-wmi-capdata01.c
 create mode 100644 drivers/platform/x86/lenovo-wmi-gamezone.c
 create mode 100644 drivers/platform/x86/lenovo-wmi-other.c
 create mode 100644 drivers/platform/x86/lenovo-wmi.c
 create mode 100644 drivers/platform/x86/lenovo-wmi.h

-- 
2.48.1





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux