summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-10-06 13:38:09 +0200
committerMichael Niewöhner <foss@mniewoehner.de>2021-01-24 21:48:06 +0000
commitb06dea9e903eca99f0ae16cc881f589424b96447 (patch)
tree7f5a648990b74fccb3bfe1eda84c577217afc25b
parent488f5d85934d396d3f487e8a849d1260ca8e4c9b (diff)
mb/razer: Convert to ASL 2.0 syntax
Generated build/dsdt.dsl are same. Change-Id: I9c7cbc4ee874657a7381b1b220872c4ebecd0821 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46085 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/mainboard/razer/blade_stealth_kbl/acpi/battery.asl28
-rw-r--r--src/mainboard/razer/blade_stealth_kbl/acpi/ec.asl10
2 files changed, 19 insertions, 19 deletions
diff --git a/src/mainboard/razer/blade_stealth_kbl/acpi/battery.asl b/src/mainboard/razer/blade_stealth_kbl/acpi/battery.asl
index 241d090a03..8f195550eb 100644
--- a/src/mainboard/razer/blade_stealth_kbl/acpi/battery.asl
+++ b/src/mainboard/razer/blade_stealth_kbl/acpi/battery.asl
@@ -40,21 +40,21 @@ Device (BAT)
Method (_BIF, 0, Serialized)
{
/* Last Full Charge Capacity */
- Store (BFCP, Index (PBIF, 2))
+ PBIF [2] = BFCP
/* Design Voltage */
- Store (BDVT, Index (PBIF, 4))
+ PBIF [4] = BDVT
/* Design Capacity */
- Store (BDCP, Index (PBIF, 1))
+ PBIF [1] = BDCP
/* Design Capacity of Warning */
- Store (BDCP / 0x32, Index (PBIF, 5))
+ PBIF [5] = BDCP / 50
/* Design Capacity of Low */
- Store (BDCP / 0x64, Index (PBIF, 6))
+ PBIF [6] = BDCP / 100
- Store (ToString (BSER, Ones), Index (PBIF, 0x0A))
+ PBIF [10] = ToString (BSER, Ones)
Return (PBIF)
}
@@ -72,34 +72,34 @@ Device (BAT)
/* Check if AC is present */
If (ACEX) {
/* Read battery status from EC */
- Store (BCST, Local0)
+ Local0 = BCST
} Else {
/* Always discharging when on battery power */
- Store (0x01, Local0)
+ Local0 = 0x01
}
- Store (Local0, Index (PBST, 0))
+ PBST [0] = Local0
/* Notify if battery state has changed since last time */
- If (LNotEqual (Local0, BSTP)) {
- Store (Local0, BSTP)
+ If (Local0 != BSTP) {
+ BSTP = Local0
Notify (BAT, 0x80)
}
/*
* 1: BATTERY PRESENT RATE
*/
- Store (BCRT, Index (PBST, 1))
+ PBST [1] = BCRT
/*
* 2: BATTERY REMAINING CAPACITY
*/
- Store (BRCP, Index (PBST, 2))
+ PBST [2] = BRCP
/*
* 3: BATTERY PRESENT VOLTAGE
*/
- Store (BCVT, Index (PBST, 3))
+ PBST [3] = BCVT
Return (PBST)
}
diff --git a/src/mainboard/razer/blade_stealth_kbl/acpi/ec.asl b/src/mainboard/razer/blade_stealth_kbl/acpi/ec.asl
index 5698dcbbcf..72eaca4beb 100644
--- a/src/mainboard/razer/blade_stealth_kbl/acpi/ec.asl
+++ b/src/mainboard/razer/blade_stealth_kbl/acpi/ec.asl
@@ -56,24 +56,24 @@ Device (EC)
Method (_REG, 2, NotSerialized)
{
/* Initialize AC power state */
- Store (PWRS - 0x82, ACEX)
+ ACEX = PWRS - 0x82
/* Initialize LID switch state */
- Store (LIDS, \LIDS)
+ \LIDS = LIDS
}
// Close ?
Method (_Q14, 0, NotSerialized)
{
- Store (LIDS, \LIDS)
+ \LIDS = LIDS
Notify (LID0, 0x80)
}
//Open
Method (_Q15, 0, NotSerialized)
{
- Store (LIDS, \LIDS)
+ \LIDS = LIDS
Notify (LID0, 0x80)
}
@@ -81,7 +81,7 @@ Device (EC)
// AC plugged
Method (_Q13, 0, NotSerialized)
{
- Store (PWRS - 0x82, ACEX)
+ ACEX = PWRS - 0x82
Notify (BAT, 0x80) // Status Change
Notify (BAT, 0x81) // Information Change
Notify (AC, 0x80) // Status Change