summaryrefslogtreecommitdiff
path: root/src/ec/lenovo
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-08-13 18:05:13 +0200
committerPatrick Rudolph <siro@das-labor.org>2017-11-14 17:44:03 +0000
commit112ae4860f2b0f2544dc3698a99dd70fce920ac1 (patch)
tree225eedec8d3ed4acbe831a6d8e4e2a0562c351b6 /src/ec/lenovo
parent28f30a138a9a77e48668a58cfc338a07de68620e (diff)
downloadcoreboot-112ae4860f2b0f2544dc3698a99dd70fce920ac1.tar.xz
ec/lenovo/h8/acpi/ec: Add registers
Add register HPPI and GSTS. Add method WLSW that is used by thinkpad_acpi kernel module. Seperate method by an empty newline. Change-Id: I5a125047fad0e08cd9256bc53c3f5a7db7e56e7d Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/20987 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'src/ec/lenovo')
-rw-r--r--src/ec/lenovo/h8/acpi/ec.asl24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl
index 0ed370f292..750121d687 100644
--- a/src/ec/lenovo/h8/acpi/ec.asl
+++ b/src/ec/lenovo/h8/acpi/ec.asl
@@ -57,6 +57,9 @@ Device(EC)
KBLT, 1, /* Keyboard Light */
, 2,
USPW, 1, /* USB Power enable */
+ Offset (0x48),
+ HPPI, 1, /* Headphone plugged in */
+ GSTS, 1, /* Master wireless switch */
Offset (0x4e),
WAKE, 16,
Offset (0x78),
@@ -288,18 +291,24 @@ Device(EC)
Name (_HID, EisaId ("IBM0068"))
Name (BTN, 0)
Name (BTAB, 0)
+
/* MASK */
Name (DHKN, 0x080C)
+
/* Effective Mask */
Name (EMSK, 0)
+
/* Effective Mask for tablet */
Name (ETAB, 0)
+
/* Device enabled. */
Name (EN, 0)
+
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}
+
/* Retrieve event. */
Method (MHKP, 0, NotSerialized)
{
@@ -317,6 +326,7 @@ Device(EC)
}
Return (Zero)
}
+
/* Report event */
Method (RHK, 1, NotSerialized) {
ShiftLeft (One, Subtract (Arg0, 1), Local0)
@@ -325,6 +335,7 @@ Device(EC)
Notify (HKEY, 0x80)
}
}
+
/* Report tablet */
Method (RTAB, 1, NotSerialized) {
ShiftLeft (One, Subtract (Arg0, 1), Local0)
@@ -333,6 +344,7 @@ Device(EC)
Notify (HKEY, 0x80)
}
}
+
/* Enable/disable all events. */
Method (MHKC, 1, NotSerialized) {
If (Arg0) {
@@ -346,6 +358,7 @@ Device(EC)
}
Store (Arg0, EN)
}
+
/* Enable/disable event. */
Method (MHKM, 2, NotSerialized) {
If (LLessEqual (Arg0, 0x20)) {
@@ -364,21 +377,25 @@ Device(EC)
}
}
}
+
/* Mask hotkey all. */
Method (MHKA, 0, NotSerialized)
{
Return (0x07FFFFFF)
}
+
/* Report tablet mode switch state */
Method (MHKG, 0, NotSerialized)
{
Return (ShiftLeft(TBSW, 3))
}
+
/* Mute audio */
Method (SSMS, 1, NotSerialized)
{
Store(Arg0, ALMT)
}
+
/* Control mute microphone LED */
Method (MMTS, 1, NotSerialized)
{
@@ -391,11 +408,18 @@ Device(EC)
TLED(0x0E)
}
}
+
/* Version */
Method (MHKV, 0, NotSerialized)
{
Return (0x0100)
}
+
+ /* Master wireless switch state */
+ Method (WLSW, 0, NotSerialized)
+ {
+ Return (\_SB.PCI0.LPCB.EC.GSTS)
+ }
}
#include "ac.asl"