summaryrefslogtreecommitdiff
path: root/src/ec/lenovo/h8
diff options
context:
space:
mode:
authorNicola Corna <nicola@corna.info>2017-02-11 14:00:03 +0100
committerAlexander Couzens <lynxis@fe80.eu>2017-02-28 14:54:59 +0100
commit47f87bd93f6ebbfd771fe0a70777aeff5c65dbff (patch)
treeeb5352e5bf24e9e9090c5b62b1476bba6c19a72a /src/ec/lenovo/h8
parentf77d6ba911d757aacdc000583af006d63ae7bc14 (diff)
downloadcoreboot-47f87bd93f6ebbfd771fe0a70777aeff5c65dbff.tar.xz
ec/lenovo/h8: Add tablet mode switch method
thinkpad_acpi expects a MHKG method which returns the current state of the tablet mode switch shifted left by 3. If such method is not found, subsequent laptop/tablet mode events are ignored. Tested on a X220T. Change-Id: Ic9ffea2ffe507b3692d1dd7411c52b813ec32146 Signed-off-by: Nicola Corna <nicola@corna.info> Reviewed-on: https://review.coreboot.org/18328 Tested-by: build bot (Jenkins) Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'src/ec/lenovo/h8')
-rw-r--r--src/ec/lenovo/h8/acpi/ec.asl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl
index b69acf82da..497dde4df7 100644
--- a/src/ec/lenovo/h8/acpi/ec.asl
+++ b/src/ec/lenovo/h8/acpi/ec.asl
@@ -32,6 +32,9 @@ Device(EC)
HSPA, 1,
Offset (0x0C),
LEDS, 8, /* LED state */
+ Offset (0x0F),
+ , 7,
+ TBSW, 1, /* Tablet mode switch */
Offset (0x1a),
DKR2, 1, /* Dock register 2 */
Offset (0x2a),
@@ -354,6 +357,11 @@ Device(EC)
{
Return (0x07FFFFFF)
}
+ /* Report tablet mode switch state */
+ Method (MHKG, 0, NotSerialized)
+ {
+ Return (TBSW << 3)
+ }
/* Version */
Method (MHKV, 0, NotSerialized)
{