All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/6] platform/x86: Add Lenovo WMI Gaming Series Drivers
@ 2025-04-28  1:18 Derek J. Clark
  2025-04-28  1:18 ` [PATCH v6 1/6] platform/x86: Add Lenovo WMI Driver Documentation Derek J. Clark
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Derek J. Clark @ 2025-04-28  1:18 UTC (permalink / raw)
  To: Hans de Goede, Ilpo Järvinen
  Cc: Armin Wolf, Jonathan Corbet, Mario Limonciello, Luke Jones,
	Xino Ni, Zhixin Zhang, Mia Shao, Mark Pearson,
	Pierre-Loup A . Griffais, Cody T . -H . Chiu, John Martens,
	Derek J . Clark, platform-driver-x86, linux-doc, linux-kernel

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@163.com/

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/platform-driver-x86/20250316230724.100165-1-luke@ljones.dev/

The drivers have been tested by me on the Lenovo Legion Go and Legion Go
S.

Suggested-by: Mario Limonciello <superm1@kernel.org>
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
---
v6:
 - Capability Data max values are determined based on the power state of the device.
   To ensure this data is accurate, recache capability data on ACPI AC/DC events.
 - Use guard/scoped guard in gamzone driver.
 - Use correct types for casts and sizeof in some places.
 - Fix formatting issues identified in v5.
v5:
https://lore.kernel.org/platform-driver-x86/20250408012815.1032357-1-derekjohn.clark@gmail.com/
v4:
https://lore.kernel.org/platform-driver-x86/20250317144326.5850-1-derekjohn.clark@gmail.com/
v3:
https://lore.kernel.org/platform-driver-x86/20250225220037.16073-1-derekjohn.clark@gmail.com/
v2:
https://lore.kernel.org/platform-driver-x86/20250102004854.14874-1-derekjohn.clark@gmail.com/
v1:
https://lore.kernel.org/platform-driver-x86/20241217230645.15027-1-derekjohn.clark@gmail.com/

Derek J. Clark (6):
  platform/x86: Add lenovo-wmi-* driver Documentation
  platform/x86: Add lenovo-wmi-helpers
  platform/x86: Add Lenovo WMI Events Driver
  platform/x86: Add Lenovo Capability Data 01 WMI Driver
  platform/x86: Add Lenovo Gamezone WMI Driver
  platform/x86: Add Lenovo Other Mode WMI Driver

 .../wmi/devices/lenovo-wmi-gamezone.rst       | 203 ++++++
 .../wmi/devices/lenovo-wmi-other.rst          | 108 +++
 MAINTAINERS                                   |  12 +
 drivers/platform/x86/Kconfig                  |  41 ++
 drivers/platform/x86/Makefile                 |   5 +
 drivers/platform/x86/lenovo-wmi-capdata01.c   | 272 ++++++++
 drivers/platform/x86/lenovo-wmi-capdata01.h   |  29 +
 drivers/platform/x86/lenovo-wmi-events.c      | 196 ++++++
 drivers/platform/x86/lenovo-wmi-events.h      |  20 +
 drivers/platform/x86/lenovo-wmi-gamezone.c    | 409 +++++++++++
 drivers/platform/x86/lenovo-wmi-gamezone.h    |  20 +
 drivers/platform/x86/lenovo-wmi-helpers.c     |  74 ++
 drivers/platform/x86/lenovo-wmi-helpers.h     |  20 +
 drivers/platform/x86/lenovo-wmi-other.c       | 655 ++++++++++++++++++
 drivers/platform/x86/lenovo-wmi-other.h       |  16 +
 15 files changed, 2080 insertions(+)
 create mode 100644 Documentation/wmi/devices/lenovo-wmi-gamezone.rst
 create mode 100644 Documentation/wmi/devices/lenovo-wmi-other.rst
 create mode 100644 drivers/platform/x86/lenovo-wmi-capdata01.c
 create mode 100644 drivers/platform/x86/lenovo-wmi-capdata01.h
 create mode 100644 drivers/platform/x86/lenovo-wmi-events.c
 create mode 100644 drivers/platform/x86/lenovo-wmi-events.h
 create mode 100644 drivers/platform/x86/lenovo-wmi-gamezone.c
 create mode 100644 drivers/platform/x86/lenovo-wmi-gamezone.h
 create mode 100644 drivers/platform/x86/lenovo-wmi-helpers.c
 create mode 100644 drivers/platform/x86/lenovo-wmi-helpers.h
 create mode 100644 drivers/platform/x86/lenovo-wmi-other.c
 create mode 100644 drivers/platform/x86/lenovo-wmi-other.h

-- 
2.49.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-05-02 21:10 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28  1:18 [PATCH v6 0/6] platform/x86: Add Lenovo WMI Gaming Series Drivers Derek J. Clark
2025-04-28  1:18 ` [PATCH v6 1/6] platform/x86: Add Lenovo WMI Driver Documentation Derek J. Clark
2025-04-28  1:18 ` [PATCH v6 2/6] platform/x86: Add Lenovo WMI Helpers Derek J. Clark
2025-04-28 19:36   ` ALOK TIWARI
2025-04-30  3:17     ` Derek J. Clark
2025-04-28  1:18 ` [PATCH v6 3/6] platform/x86: Add Lenovo WMI Events Driver Derek J. Clark
2025-04-28 20:57   ` [External] : " ALOK TIWARI
2025-04-30  3:23     ` Derek J. Clark
2025-05-02  2:00       ` Armin Wolf
2025-04-28  1:18 ` [PATCH v6 4/6] platform/x86: Add Lenovo WMI Capability Data 01 Driver Derek J. Clark
2025-05-02  2:18   ` Armin Wolf
2025-05-02 15:51     ` Derek J. Clark
2025-05-02 21:10       ` Armin Wolf
2025-04-28  1:18 ` [PATCH v6 5/6] platform/x86: Add Lenovo WMI Gamezone Driver Derek J. Clark
2025-04-29  4:39   ` ALOK TIWARI
2025-04-30  3:26     ` Derek J. Clark
2025-04-30  7:58       ` Ilpo Järvinen
2025-04-30 10:10         ` Derek J. Clark
2025-05-02  2:26   ` Armin Wolf
2025-04-28  1:18 ` [PATCH v6 6/6] platform/x86: Add Lenovo WMI Other Mode Driver Derek J. Clark
2025-04-29 20:13   ` ALOK TIWARI
2025-04-30  3:26     ` Derek J. Clark
2025-05-02  2:32   ` Armin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.