Skip to content

Commit a40cd7e

Browse files
mrhpearsonjwrdegoede
authored andcommitted
platform/x86: think-lmi: Add WMI interface support on Lenovo platforms
For Lenovo platforms that support a WMI interface to the BIOS add support, using the firmware-attributes class, to allow users to access and modify various BIOS related settings. Signed-off-by: Mark Pearson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 8a1c379 commit a40cd7e

File tree

6 files changed

+1008
-1
lines changed

6 files changed

+1008
-1
lines changed

Documentation/ABI/testing/sysfs-class-firmware-attributes

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,24 @@ Description:
197197
Drivers may emit a CHANGE uevent when a password is set or unset
198198
userspace may check it again.
199199

200-
On Dell systems, if Admin password is set, then all BIOS attributes
200+
On Dell and Lenovo systems, if Admin password is set, then all BIOS attributes
201201
require password validation.
202+
On Lenovo systems if you change the Admin password the new password is not active until
203+
the next boot.
204+
205+
Lenovo specific class extensions
206+
------------------------------
207+
208+
On Lenovo systems the following additional settings are available:
209+
210+
lenovo_encoding:
211+
The encoding method that is used. This can be either "ascii"
212+
or "scancode". Default is set to "ascii"
213+
214+
lenovo_kbdlang:
215+
The keyboard language method that is used. This is generally a
216+
two char code (e.g. "us", "fr", "gr") and may vary per platform.
217+
Default is set to "us"
202218

203219
What: /sys/class/firmware-attributes/*/attributes/pending_reboot
204220
Date: February 2021

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18163,6 +18163,13 @@ W: http://thinkwiki.org/wiki/Ibm-acpi
1816318163
T: git git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
1816418164
F: drivers/platform/x86/thinkpad_acpi.c
1816518165

18166+
THINKPAD LMI DRIVER
18167+
M: Mark Pearson <[email protected]>
18168+
18169+
S: Maintained
18170+
F: Documentation/ABI/testing/sysfs-class-firmware-attributes
18171+
F: drivers/platform/x86/think-lmi.?
18172+
1816618173
THUNDERBOLT DMA TRAFFIC TEST DRIVER
1816718174
M: Isaac Hazan <[email protected]>
1816818175

drivers/platform/x86/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,17 @@ config THINKPAD_ACPI_HOTKEY_POLL
640640
If you are not sure, say Y here. The driver enables polling only if
641641
it is strictly necessary to do so.
642642

643+
config THINKPAD_LMI
644+
tristate "Lenovo WMI-based systems management driver"
645+
depends on ACPI_WMI
646+
select FW_ATTR_CLASS
647+
help
648+
This driver allows changing BIOS settings on Lenovo machines whose
649+
BIOS support the WMI interface.
650+
651+
To compile this driver as a module, choose M here: the module will
652+
be called think-lmi.
653+
643654
config INTEL_ATOMISP2_LED
644655
tristate "Intel AtomISP2 camera LED driver"
645656
depends on GPIOLIB && LEDS_GPIO

drivers/platform/x86/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ obj-$(CONFIG_IBM_RTL) += ibm_rtl.o
6363
obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o
6464
obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o
6565
obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
66+
obj-$(CONFIG_THINKPAD_LMI) += think-lmi.o
6667

6768
# Intel
6869
obj-$(CONFIG_INTEL_ATOMISP2_LED) += intel_atomisp2_led.o

0 commit comments

Comments
 (0)