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>
This commit is contained in:
Nicola Corna 2017-02-11 14:00:03 +01:00 committed by Alexander Couzens
parent f77d6ba911
commit 47f87bd93f
1 changed files with 8 additions and 0 deletions

View File

@ -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)
{