Skip to content

Commit

Permalink
platform/x86: think-lmi: Add WMI interface support on Lenovo platforms
Browse files Browse the repository at this point in the history
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 <markpearson@lenovo.com>
Link: https://lore.kernel.org/r/20210530223111.25929-3-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Mark Pearson authored and Hans de Goede committed Jun 16, 2021
1 parent 8a1c379 commit a40cd7e
Show file tree
Hide file tree
Showing 6 changed files with 1,008 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Documentation/ABI/testing/sysfs-class-firmware-attributes
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,24 @@ Description:
Drivers may emit a CHANGE uevent when a password is set or unset
userspace may check it again.

On Dell systems, if Admin password is set, then all BIOS attributes
On Dell and Lenovo systems, if Admin password is set, then all BIOS attributes
require password validation.
On Lenovo systems if you change the Admin password the new password is not active until
the next boot.

Lenovo specific class extensions
------------------------------

On Lenovo systems the following additional settings are available:

lenovo_encoding:
The encoding method that is used. This can be either "ascii"
or "scancode". Default is set to "ascii"

lenovo_kbdlang:
The keyboard language method that is used. This is generally a
two char code (e.g. "us", "fr", "gr") and may vary per platform.
Default is set to "us"

What: /sys/class/firmware-attributes/*/attributes/pending_reboot
Date: February 2021
Expand Down
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -18163,6 +18163,13 @@ W: http://thinkwiki.org/wiki/Ibm-acpi
T: git git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
F: drivers/platform/x86/thinkpad_acpi.c

THINKPAD LMI DRIVER
M: Mark Pearson <markpearson@lenovo.com>
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: Documentation/ABI/testing/sysfs-class-firmware-attributes
F: drivers/platform/x86/think-lmi.?

THUNDERBOLT DMA TRAFFIC TEST DRIVER
M: Isaac Hazan <isaac.hazan@intel.com>
L: linux-usb@vger.kernel.org
Expand Down
11 changes: 11 additions & 0 deletions drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,17 @@ config THINKPAD_ACPI_HOTKEY_POLL
If you are not sure, say Y here. The driver enables polling only if
it is strictly necessary to do so.

config THINKPAD_LMI
tristate "Lenovo WMI-based systems management driver"
depends on ACPI_WMI
select FW_ATTR_CLASS
help
This driver allows changing BIOS settings on Lenovo machines whose
BIOS support the WMI interface.

To compile this driver as a module, choose M here: the module will
be called think-lmi.

config INTEL_ATOMISP2_LED
tristate "Intel AtomISP2 camera LED driver"
depends on GPIOLIB && LEDS_GPIO
Expand Down
1 change: 1 addition & 0 deletions drivers/platform/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ obj-$(CONFIG_IBM_RTL) += ibm_rtl.o
obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o
obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o
obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
obj-$(CONFIG_THINKPAD_LMI) += think-lmi.o

# Intel
obj-$(CONFIG_INTEL_ATOMISP2_LED) += intel_atomisp2_led.o
Expand Down
Loading

0 comments on commit a40cd7e

Please sign in to comment.