diff options
Diffstat (limited to 'src/ec/smsc/mec1308/acpi')
-rw-r--r-- | src/ec/smsc/mec1308/acpi/battery.asl | 44 | ||||
-rw-r--r-- | src/ec/smsc/mec1308/acpi/ec.asl | 56 |
2 files changed, 50 insertions, 50 deletions
diff --git a/src/ec/smsc/mec1308/acpi/battery.asl b/src/ec/smsc/mec1308/acpi/battery.asl index dbc08ddc7c..7669513a68 100644 --- a/src/ec/smsc/mec1308/acpi/battery.asl +++ b/src/ec/smsc/mec1308/acpi/battery.asl @@ -47,13 +47,13 @@ Device (BAT0) // Method to enable full battery workaround Method (BFWE) { - Store (One, BFWK) + BFWK = One } // Method to disable full battery workaround Method (BFWD) { - Store (Zero, BFWK) + BFWK = Zero } // Swap bytes in a word @@ -64,7 +64,7 @@ Device (BAT0) And (Local1, 0xFF00, Local1) Or (Local0, Local1, Local0) If (Local0 == 0xFFFF) { - Store (0xFFFFFFFF, Local0) + Local0 = 0xFFFFFFFF } Return (Local0) } @@ -81,15 +81,15 @@ Device (BAT0) Method (_BIF, 0, Serialized) { // Update fields from EC - Store (SWAB (BTDA), PBIF[1]) - Store (SWAB (BTDF), PBIF[2]) - Store (SWAB (BTDV), PBIF[4]) - Store (SWAB (BTDL), PBIF[6]) + PBIF[1] = SWAB (BTDA) + PBIF[2] = SWAB (BTDF) + PBIF[4] = SWAB (BTDV) + PBIF[6] = SWAB (BTDL) // Get battery info from mainboard - Store (\BATM, PBIF[9]) - Store (\BATS, PBIF[10]) - Store (\BATV, PBIF[12]) + PBIF[9] = \BATM + PBIF[10] = \BATS + PBIF[12] = \BATV Return (PBIF) } @@ -105,8 +105,8 @@ Device (BAT0) // // Get battery state from EC - Store (BTST, Local0) - Store (Zero, Local1) + Local0 = BTST + Local1 = Zero // Check if AC is present If (ACEX) { @@ -114,17 +114,17 @@ Device (BAT0) And (Local0, 0x03, Local1) } Else { // Always discharging when on battery power - Store (0x01, Local1) + Local1 = 0x01 } // Flag if the battery level is critical And (Local0, 0x04, Local4) Or (Local1, Local4, Local1) - Store (Local1, PBST[0]) + PBST[0] = Local1 // Notify if battery state has changed since last time If (Local1 != BSTP) { - Store (Local1, BSTP) + BSTP = Local1 Notify (BAT0, 0x80) } @@ -132,17 +132,17 @@ Device (BAT0) // 1: BATTERY PRESENT RATE // - Store (SWAB (BTPR), Local1) + Local1 = SWAB (BTPR) If (Local1 != 0xFFFFFFFF && Local1 >= 0x8000) { Xor (Local1, 0xFFFF, Local1) Local1++ } - Store (Local1, PBST[1]) + PBST[1] = Local1 // // 2: BATTERY REMAINING CAPACITY // - Store (SWAB (BTRA), Local1) + Local1 = SWAB (BTRA) If (Local1 != 0xFFFFFFFF && Local1 >= 0x8000) { Xor (Local1, 0xFFFF, Local1) Local1++ @@ -153,21 +153,21 @@ Device (BAT0) // nor discharging. Linux expects a full battery // to report same capacity as last full charge. // https://bugzilla.kernel.org/show_bug.cgi?id=12632 - Store (SWAB (BTDF), Local2) + Local2 = SWAB (BTDF) // See if within ~3% of full ShiftRight (Local2, 5, Local3) If (Local1 > Local2 - Local3 && Local1 < Local2 + Local3) { - Store (Local2, Local1) + Local1 = Local2 } } - Store (Local1, PBST[2]) + PBST[2] = Local1 // // 3: BATTERY PRESENT VOLTAGE // - Store (SWAB (BTVO), PBST[3]) + PBST[3] = SWAB (BTVO) Return (PBST) } diff --git a/src/ec/smsc/mec1308/acpi/ec.asl b/src/ec/smsc/mec1308/acpi/ec.asl index 7394733425..214e89b4c0 100644 --- a/src/ec/smsc/mec1308/acpi/ec.asl +++ b/src/ec/smsc/mec1308/acpi/ec.asl @@ -58,16 +58,16 @@ Device (EC0) Method (_REG, 2, NotSerialized) { // Initialize AC power state - Store (ACEX, \PWRS) + \PWRS = ACEX // Initialize LID switch state - Store (LIDS, \LIDS) + \LIDS = LIDS // Enable OS control of fan speed - Store (One, FCOS) + FCOS = One // Force a read of CPU temperature - Store (CPUT, Local0) + Local0 = CPUT /* So that we don't get a warning that Local0 is unused. */ Local0++ } @@ -83,15 +83,15 @@ Device (EC0) } Method (_ON) { If (FCOS) { - Store (One, FSL0) - Store (0, \FLVL) + FSL0 = One + \FLVL = 0 Notify (\_TZ.THRM, 0x81) } } Method (_OFF) { If (FCOS) { - Store (Zero, FSL0) - Store (1, \FLVL) + FSL0 = Zero + \FLVL = 1 Notify (\_TZ.THRM, 0x81) } } @@ -108,15 +108,15 @@ Device (EC0) } Method (_ON) { If (FCOS) { - Store (One, FSL1) - Store (1, \FLVL) + FSL1 = One + \FLVL = 1 Notify (\_TZ.THRM, 0x81) } } Method (_OFF) { If (FCOS) { - Store (Zero, FSL1) - Store (2, \FLVL) + FSL1 = Zero + \FLVL = 2 Notify (\_TZ.THRM, 0x81) } } @@ -133,15 +133,15 @@ Device (EC0) } Method (_ON) { If (FCOS) { - Store (One, FSL2) - Store (2, \FLVL) + FSL2 = One + \FLVL = 2 Notify (\_TZ.THRM, 0x81) } } Method (_OFF) { If (FCOS) { - Store (Zero, FSL2) - Store (3, \FLVL) + FSL2 = Zero + \FLVL = 3 Notify (\_TZ.THRM, 0x81) } } @@ -158,15 +158,15 @@ Device (EC0) } Method (_ON) { If (FCOS) { - Store (One, FSL3) - Store (3, \FLVL) + FSL3 = One + \FLVL = 3 Notify (\_TZ.THRM, 0x81) } } Method (_OFF) { If (FCOS) { - Store (Zero, FSL3) - Store (4, \FLVL) + FSL3 = Zero + \FLVL = 4 Notify (\_TZ.THRM, 0x81) } } @@ -183,15 +183,15 @@ Device (EC0) } Method (_ON) { If (FCOS) { - Store (One, FSL4) - Store (4, \FLVL) + FSL4 = One + \FLVL = 4 Notify (\_TZ.THRM, 0x81) } } Method (_OFF) { If (FCOS) { - Store (Zero, FSL4) - Store (5, \FLVL) + FSL4 = Zero + \FLVL = 5 Notify (\_TZ.THRM, 0x81) } } @@ -235,7 +235,7 @@ Device (EC0) // AC Power Connected Method (_Q51, 0, NotSerialized) { - Store (One, \PWRS) + \PWRS = One Notify (AC, 0x80) \PNOT () } @@ -243,7 +243,7 @@ Device (EC0) // AC Power Removed Method (_Q52, 0, NotSerialized) { - Store (Zero, \PWRS) + \PWRS = Zero Notify (AC, 0x80) \PNOT () } @@ -271,14 +271,14 @@ Device (EC0) // Lid Switch Event Method (_Q5E, 0, NotSerialized) { - Store (LIDS, \LIDS) + \LIDS = LIDS Notify (\_SB.LID0, 0x80) } // Lid Switch Event Method (_Q5F, 0, NotSerialized) { - Store (LIDS, \LIDS) + \LIDS = LIDS Notify (\_SB.LID0, 0x80) } |