aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/acpi/dptf/charger.asl
diff options
context:
space:
mode:
authorAlexey Buyanov <alexey.buyanov@intel.com>2020-06-01 21:41:14 -0700
committerSubrata Banik <subrata.banik@intel.com>2020-06-13 09:03:32 +0000
commit03248033e7be6f81ad5b60ed21a60071aee32c67 (patch)
treeed158e24bf2808c7ed1546418f23754f5857fbfb /src/soc/intel/common/acpi/dptf/charger.asl
parente334fea94b126760cf34f93131a884886a6de3a7 (diff)
soc/intel/common: Introduce ASL2.0 syntax
Modify soc/intel/common .asl files to comply with ASL2.0 syntax for better code readability and clarity BUG=none BRANCH=none TEST= Deltan coreboot binary remains the same after the changes are applied Signed-off-by: Alexey Buyanov <alexey.buyanov@intel.com> Change-Id: I8f95cf88f499d9f9bdd8c80c95af52f8fd886cdf Reviewed-on: https://review.coreboot.org/c/coreboot/+/42083 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com> Reviewed-by: V Sowmya <v.sowmya@intel.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/common/acpi/dptf/charger.asl')
-rw-r--r--src/soc/intel/common/acpi/dptf/charger.asl11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/soc/intel/common/acpi/dptf/charger.asl b/src/soc/intel/common/acpi/dptf/charger.asl
index fca9590c37..96d314fc40 100644
--- a/src/soc/intel/common/acpi/dptf/charger.asl
+++ b/src/soc/intel/common/acpi/dptf/charger.asl
@@ -9,7 +9,7 @@ Device (TCHG)
Method (_STA)
{
- If (LEqual (\DPTE, One)) {
+ If (\DPTE == One) {
Return (0xF)
} Else {
Return (0x0)
@@ -26,11 +26,11 @@ Device (TCHG)
Method (PPPC)
{
/* Convert size of PPSS table to index */
- Store (SizeOf (\_SB.CHPS), Local0)
- Decrement (Local0)
+ Local0 = SizeOf (\_SB.CHPS)
+ Local0--
/* Check if charging is disabled (AC removed) */
- If (LEqual (\_SB.PCI0.LPCB.EC0.ACEX, Zero)) {
+ If (\_SB.PCI0.LPCB.EC0.ACEX == 0) {
/* Return last power state */
Return (Local0)
} Else {
@@ -45,8 +45,7 @@ Device (TCHG)
Method (SPPC, 1)
{
/* Retrieve Control (index 4) for specified PPSS level */
- Store (DeRefOf (Index (DeRefOf (Index
- (\_SB.CHPS, ToInteger (Arg0))), 4)), Local0)
+ Local0 = DeRefOf (DeRefOf (\_SB.CHPS[ToInteger (Arg0)])[4])
/* Pass Control value to EC to limit charging */
\_SB.PCI0.LPCB.EC0.CHGS (Local0)