Unverified Commit edc4b183 authored by Derek J. Clark's avatar Derek J. Clark Committed by Ilpo Järvinen
Browse files

platform/x86: Add Lenovo Other Mode WMI Driver



Adds lenovo-wmi-other driver which provides the Lenovo "Other Mode" WMI
interface that comes on some Lenovo "Gaming Series" hardware. Provides a
firmware-attributes class which enables the use of tunable knobs for SPL,
SPPT, and FPPT.

Reviewed-by: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: default avatarArmin Wolf <W_Armin@gmx.de>
Signed-off-by: default avatarDerek J. Clark <derekjohn.clark@gmail.com>
Link: https://lore.kernel.org/r/20250702033826.1057762-7-derekjohn.clark@gmail.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 22024ac5
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -258,3 +258,18 @@ config LENOVO_WMI_GAMEZONE

	  To compile this driver as a module, choose M here: the module will
	  be called lenovo-wmi-gamezone.

config LENOVO_WMI_TUNING
	tristate "Lenovo Other Mode WMI Driver"
	depends on ACPI_WMI
	select FW_ATTR_CLASS
	select LENOVO_WMI_DATA01
	select LENOVO_WMI_EVENTS
	select LENOVO_WMI_HELPERS
	help
	  Say Y here if you have a WMI aware Lenovo Legion device and would like to use the
	  firmware_attributes API to control various tunable settings typically exposed by
	  Lenovo software in Windows.

	  To compile this driver as a module, choose M here: the module will
	  be called lenovo-wmi-other.
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ lenovo-target-$(CONFIG_LENOVO_WMI_DATA01) += wmi-capdata01.o
lenovo-target-$(CONFIG_LENOVO_WMI_EVENTS)	+= wmi-events.o
lenovo-target-$(CONFIG_LENOVO_WMI_HELPERS)	+= wmi-helpers.o
lenovo-target-$(CONFIG_LENOVO_WMI_GAMEZONE)	+= wmi-gamezone.o
lenovo-target-$(CONFIG_LENOVO_WMI_TUNING)	+= wmi-other.o

# Add 'lenovo' prefix to each module listed in lenovo-target-*
define LENOVO_OBJ_TARGET
+665 −0

File added.

Preview size limit exceeded, changes collapsed.

+16 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-or-later */

/* Copyright (C) 2025 Derek J. Clark <derekjohn.clark@gmail.com> */

#ifndef _LENOVO_WMI_OTHER_H_
#define _LENOVO_WMI_OTHER_H_

struct device;
struct notifier_block;

int lwmi_om_register_notifier(struct notifier_block *nb);
int lwmi_om_unregister_notifier(struct notifier_block *nb);
int devm_lwmi_om_register_notifier(struct device *dev,
				   struct notifier_block *nb);

#endif /* !_LENOVO_WMI_OTHER_H_ */