diff options
Diffstat (limited to 'src/ec/lenovo/h8')
-rw-r--r-- | src/ec/lenovo/h8/acpi/ec.asl | 418 | ||||
-rw-r--r-- | src/ec/lenovo/h8/acpi/lid.asl | 2 | ||||
-rw-r--r-- | src/ec/lenovo/h8/acpi/sleepbutton.asl | 2 | ||||
-rw-r--r-- | src/ec/lenovo/h8/acpi/thermal.asl | 20 |
4 files changed, 221 insertions, 221 deletions
diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl index 085492d539..b69acf82da 100644 --- a/src/ec/lenovo/h8/acpi/ec.asl +++ b/src/ec/lenovo/h8/acpi/ec.asl @@ -27,13 +27,13 @@ Device(EC) Field (ERAM, ByteAcc, NoLock, Preserve) { Offset (0x02), - DKR1, 1, /* Dock register 1 */ + DKR1, 1, /* Dock register 1 */ Offset (0x05), HSPA, 1, Offset (0x0C), LEDS, 8, /* LED state */ Offset (0x1a), - DKR2, 1, /* Dock register 2 */ + DKR2, 1, /* Dock register 2 */ Offset (0x2a), EVNT, 8, /* write will trigger EC event */ Offset (0x3a), @@ -56,7 +56,7 @@ Device(EC) PAGE, 8, /* Information Page Selector */ Offset (0xfe), , 4, - DKR3, 1 /* Dock register 3 */ + DKR3, 1 /* Dock register 3 */ } Method (_CRS, 0) @@ -140,226 +140,226 @@ Device(EC) Store(0x50, EVNT) } - Method(_Q2A, 0, NotSerialized) - { - Notify(^LID, 0x80) - } - - Method(_Q2B, 0, NotSerialized) - { - Notify(^LID, 0x80) - } - - - /* IBM proprietary buttons. */ - - Method (_Q10, 0, NotSerialized) - { - ^HKEY.RHK (0x01) - } - - Method (_Q11, 0, NotSerialized) - { - ^HKEY.RHK (0x02) - } - - Method (_Q12, 0, NotSerialized) - { - ^HKEY.RHK (0x03) - } - - Method (_Q64, 0, NotSerialized) - { - ^HKEY.RHK (0x05) - } - - Method (_Q65, 0, NotSerialized) - { - ^HKEY.RHK (0x06) - } - - Method (_Q17, 0, NotSerialized) - { - ^HKEY.RHK (0x08) - } - - Method (_Q66, 0, NotSerialized) - { - ^HKEY.RHK (0x0A) - } - - Method (_Q6A, 0, NotSerialized) - { - ^HKEY.RHK (0x1B) - } - - Method (_Q1A, 0, NotSerialized) - { - ^HKEY.RHK (0x0B) - } - - Method (_Q1B, 0, NotSerialized) - { - ^HKEY.RHK (0x0C) - } - - Method (_Q62, 0, NotSerialized) - { - ^HKEY.RHK (0x0D) - } - - Method (_Q60, 0, NotSerialized) - { - ^HKEY.RHK (0x0E) - } - - Method (_Q61, 0, NotSerialized) - { - ^HKEY.RHK (0x0F) - } - - Method (_Q1F, 0, NotSerialized) - { - ^HKEY.RHK (0x12) - } - - Method (_Q67, 0, NotSerialized) - { - ^HKEY.RHK (0x13) - } - - Method (_Q63, 0, NotSerialized) - { - ^HKEY.RHK (0x14) - } - - Method (_Q19, 0, NotSerialized) - { - ^HKEY.RHK (0x18) - } - - Method (_Q1C, 0, NotSerialized) - { - ^HKEY.RHK (0x19) - } - - Method (_Q1D, 0, NotSerialized) - { - ^HKEY.RHK (0x1A) - } - - Method (_Q5C, 0, NotSerialized) - { - ^HKEY.RTAB (0xB) - } - - Method (_Q5D, 0, NotSerialized) - { - ^HKEY.RTAB (0xC) - } - - Method (_Q5E, 0, NotSerialized) - { - ^HKEY.RTAB (0x9) - } - - Method (_Q5F, 0, NotSerialized) - { - ^HKEY.RTAB (0xA) - } - - Device (HKEY) - { - 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) - { - Store (BTN, Local0) - If (LNotEqual (Local0, Zero)) { - Store (Zero, BTN) - Add (Local0, 0x1000, Local0) - Return (Local0) - } - Store (BTAB, Local0) - If (LNotEqual (Local0, Zero)) { - Store (Zero, BTAB) - Add (Local0, 0x5000, Local0) - Return (Local0) - } - Return (Zero) - } - /* Report event */ - Method (RHK, 1, NotSerialized) { - ShiftLeft (One, Subtract (Arg0, 1), Local0) - If (And (EMSK, Local0)) { - Store (Arg0, BTN) - Notify (HKEY, 0x80) - } - } - /* Report tablet */ - Method (RTAB, 1, NotSerialized) { - ShiftLeft (One, Subtract (Arg0, 1), Local0) - If (And (ETAB, Local0)) { - Store (Arg0, BTAB) - Notify (HKEY, 0x80) - } - } - /* Enable/disable all events. */ - Method (MHKC, 1, NotSerialized) { - If (Arg0) { + Method(_Q2A, 0, NotSerialized) + { + Notify(^LID, 0x80) + } + + Method(_Q2B, 0, NotSerialized) + { + Notify(^LID, 0x80) + } + + + /* IBM proprietary buttons. */ + + Method (_Q10, 0, NotSerialized) + { + ^HKEY.RHK (0x01) + } + + Method (_Q11, 0, NotSerialized) + { + ^HKEY.RHK (0x02) + } + + Method (_Q12, 0, NotSerialized) + { + ^HKEY.RHK (0x03) + } + + Method (_Q64, 0, NotSerialized) + { + ^HKEY.RHK (0x05) + } + + Method (_Q65, 0, NotSerialized) + { + ^HKEY.RHK (0x06) + } + + Method (_Q17, 0, NotSerialized) + { + ^HKEY.RHK (0x08) + } + + Method (_Q66, 0, NotSerialized) + { + ^HKEY.RHK (0x0A) + } + + Method (_Q6A, 0, NotSerialized) + { + ^HKEY.RHK (0x1B) + } + + Method (_Q1A, 0, NotSerialized) + { + ^HKEY.RHK (0x0B) + } + + Method (_Q1B, 0, NotSerialized) + { + ^HKEY.RHK (0x0C) + } + + Method (_Q62, 0, NotSerialized) + { + ^HKEY.RHK (0x0D) + } + + Method (_Q60, 0, NotSerialized) + { + ^HKEY.RHK (0x0E) + } + + Method (_Q61, 0, NotSerialized) + { + ^HKEY.RHK (0x0F) + } + + Method (_Q1F, 0, NotSerialized) + { + ^HKEY.RHK (0x12) + } + + Method (_Q67, 0, NotSerialized) + { + ^HKEY.RHK (0x13) + } + + Method (_Q63, 0, NotSerialized) + { + ^HKEY.RHK (0x14) + } + + Method (_Q19, 0, NotSerialized) + { + ^HKEY.RHK (0x18) + } + + Method (_Q1C, 0, NotSerialized) + { + ^HKEY.RHK (0x19) + } + + Method (_Q1D, 0, NotSerialized) + { + ^HKEY.RHK (0x1A) + } + + Method (_Q5C, 0, NotSerialized) + { + ^HKEY.RTAB (0xB) + } + + Method (_Q5D, 0, NotSerialized) + { + ^HKEY.RTAB (0xC) + } + + Method (_Q5E, 0, NotSerialized) + { + ^HKEY.RTAB (0x9) + } + + Method (_Q5F, 0, NotSerialized) + { + ^HKEY.RTAB (0xA) + } + + Device (HKEY) + { + 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) + { + Store (BTN, Local0) + If (LNotEqual (Local0, Zero)) { + Store (Zero, BTN) + Add (Local0, 0x1000, Local0) + Return (Local0) + } + Store (BTAB, Local0) + If (LNotEqual (Local0, Zero)) { + Store (Zero, BTAB) + Add (Local0, 0x5000, Local0) + Return (Local0) + } + Return (Zero) + } + /* Report event */ + Method (RHK, 1, NotSerialized) { + ShiftLeft (One, Subtract (Arg0, 1), Local0) + If (And (EMSK, Local0)) { + Store (Arg0, BTN) + Notify (HKEY, 0x80) + } + } + /* Report tablet */ + Method (RTAB, 1, NotSerialized) { + ShiftLeft (One, Subtract (Arg0, 1), Local0) + If (And (ETAB, Local0)) { + Store (Arg0, BTAB) + Notify (HKEY, 0x80) + } + } + /* Enable/disable all events. */ + Method (MHKC, 1, NotSerialized) { + If (Arg0) { Store (DHKN, EMSK) Store (Ones, ETAB) - } - Else - { + } + Else + { Store (Zero, EMSK) Store (Zero, ETAB) - } - Store (Arg0, EN) - } - /* Enable/disable event. */ - Method (MHKM, 2, NotSerialized) { - If (LLessEqual (Arg0, 0x20)) { + } + Store (Arg0, EN) + } + /* Enable/disable event. */ + Method (MHKM, 2, NotSerialized) { + If (LLessEqual (Arg0, 0x20)) { ShiftLeft (One, Subtract (Arg0, 1), Local0) If (Arg1) { - Or (DHKN, Local0, DHKN) + Or (DHKN, Local0, DHKN) } Else { - And (DHKN, Not (Local0), DHKN) + And (DHKN, Not (Local0), DHKN) } If (EN) { - Store (DHKN, EMSK) + Store (DHKN, EMSK) } - } - } - /* Mask hotkey all. */ - Method (MHKA, 0, NotSerialized) - { - Return (0x07FFFFFF) - } - /* Version */ - Method (MHKV, 0, NotSerialized) - { - Return (0x0100) - } - } + } + } + /* Mask hotkey all. */ + Method (MHKA, 0, NotSerialized) + { + Return (0x07FFFFFF) + } + /* Version */ + Method (MHKV, 0, NotSerialized) + { + Return (0x0100) + } + } #include "ac.asl" #include "battery.asl" diff --git a/src/ec/lenovo/h8/acpi/lid.asl b/src/ec/lenovo/h8/acpi/lid.asl index 10c5a9887e..a8e17cb785 100644 --- a/src/ec/lenovo/h8/acpi/lid.asl +++ b/src/ec/lenovo/h8/acpi/lid.asl @@ -16,7 +16,7 @@ Field(ERAM, ByteAcc, NoLock, Preserve) { - Offset (0x32), + Offset (0x32), , 2, WKLD, 1, Offset (0x46), diff --git a/src/ec/lenovo/h8/acpi/sleepbutton.asl b/src/ec/lenovo/h8/acpi/sleepbutton.asl index 0517992d13..2f36c4b229 100644 --- a/src/ec/lenovo/h8/acpi/sleepbutton.asl +++ b/src/ec/lenovo/h8/acpi/sleepbutton.asl @@ -25,7 +25,7 @@ Field(ERAM, ByteAcc, NoLock, Preserve) Device(SLPB) { - Name (_HID, EisaId ("PNP0C0E")) + Name (_HID, EisaId ("PNP0C0E")) Method(_PRW, 0, NotSerialized) { Return (Package() { 0x18, 0x03 }) diff --git a/src/ec/lenovo/h8/acpi/thermal.asl b/src/ec/lenovo/h8/acpi/thermal.asl index 3a3487d257..2e95b691c5 100644 --- a/src/ec/lenovo/h8/acpi/thermal.asl +++ b/src/ec/lenovo/h8/acpi/thermal.asl @@ -23,11 +23,11 @@ Scope(\_TZ) Multiply(Arg0, 10, Local0) Add (Local0, 2732, Local0) if (LLessEqual(Local0, 2732)) { - Return (3000) + Return (3000) } if (LGreater(Local0, 4012)) { - Return (3000) + Return (3000) } Return (Local0) } @@ -39,10 +39,10 @@ Scope(\_TZ) } Method(_TMP) { #if defined (EC_LENOVO_H8_ME_WORKAROUND) - /* Avoid tripping alarm if ME isn't booted at all yet */ - If (LAnd (LNot (MEB1), LEqual (\_SB.PCI0.LPCB.EC.TMP0, 128))) { - Return (C2K(40)) - } + /* Avoid tripping alarm if ME isn't booted at all yet */ + If (LAnd (LNot (MEB1), LEqual (\_SB.PCI0.LPCB.EC.TMP0, 128))) { + Return (C2K(40)) + } Store (1, MEB1) #endif Return (C2K(\_SB.PCI0.LPCB.EC.TMP0)) @@ -61,10 +61,10 @@ Scope(\_TZ) Method(_TMP) { #if defined (EC_LENOVO_H8_ME_WORKAROUND) - /* Avoid tripping alarm if ME isn't booted at all yet */ - If (LAnd (LNot (MEB2), LEqual (\_SB.PCI0.LPCB.EC.TMP1, 128))) { - Return (C2K(40)) - } + /* Avoid tripping alarm if ME isn't booted at all yet */ + If (LAnd (LNot (MEB2), LEqual (\_SB.PCI0.LPCB.EC.TMP1, 128))) { + Return (C2K(40)) + } Store (1, MEB2) #endif Return (C2K(\_SB.PCI0.LPCB.EC.TMP1)) |