aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/acpi/dptf/charger.asl
diff options
context:
space:
mode:
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)