summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorStefan Ott <stefan@ott.net>2017-05-10 02:01:44 +0200
committerPatrick Georgi <pgeorgi@google.com>2017-05-11 16:43:26 +0200
commitf63fbdb63ae19bb0cc75ef2f3ab0301e8db4a1da (patch)
treeb544c9e96fc00415e7a021e7b428b42fb4e4a430 /src/mainboard
parent10984d1034a5525d590b9501f4d34b44bccc52be (diff)
downloadcoreboot-f63fbdb63ae19bb0cc75ef2f3ab0301e8db4a1da.tar.xz
mb/lenovo/x201: Add support for ThinkLight
The thinkpad-acpi driver uses the UCMS (CMOS) ACPI method to control the ThinkLight from the Operating System. This patch adds partial support for that method, enough to enable or disable the ThinkLight: echo on >/proc/acpi/ibm/light echo off >/proc/acpi/ibm/light With the original BIOS the UCMS method exposes a wide range of values through a generic /proc/acpi/ibm/cmos interface. With the changes suggested in this patch that interface is also exposed but only accepts the commands to enable or disable the ThinkLight; all other commands are ignored. This change would potentially benefit all currently supported Thinkpad models, I only have an X201 available for tests though. Change-Id: I80285f6630b5830766d82e3ecd174c4a51aa9066 Signed-off-by: Stefan Ott <stefan@ott.net> Reviewed-on: https://review.coreboot.org/19644 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/lenovo/x201/acpi/platform.asl15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mainboard/lenovo/x201/acpi/platform.asl b/src/mainboard/lenovo/x201/acpi/platform.asl
index 3aa12e9f88..0a6d5f3448 100644
--- a/src/mainboard/lenovo/x201/acpi/platform.asl
+++ b/src/mainboard/lenovo/x201/acpi/platform.asl
@@ -67,6 +67,21 @@ Method(_WAK,1)
Return(Package(){0,0})
}
+Method(UCMS, 1, Serialized)
+{
+ Switch(ToInteger(Arg0))
+ {
+ Case (0x0c) /* Turn on ThinkLight */
+ {
+ \_SB.PCI0.LPCB.EC.LGHT(1)
+ }
+ Case (0x0d) /* Turn off ThinkLight */
+ {
+ \_SB.PCI0.LPCB.EC.LGHT(0)
+ }
+ }
+}
+
/* System Bus */
Scope(\_SB)