From 83ba290f6db1f679179023ff9984c1ac31af7430 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Wed, 29 Dec 2021 15:37:08 +0100 Subject: ec/smsc/mec1308/acpi: Replace LAnd() with ASL 2.0 syntax Replace `LAnd (a, b)` with `a && b`. Change-Id: I8c3323e1d367872e9f2a134eaf4ebd9e35f74313 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/60463 Tested-by: build bot (Jenkins) Reviewed-by: HAOUAS Elyes --- src/ec/smsc/mec1308/acpi/battery.asl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/ec') diff --git a/src/ec/smsc/mec1308/acpi/battery.asl b/src/ec/smsc/mec1308/acpi/battery.asl index a072c93ae8..bbbcfe225f 100644 --- a/src/ec/smsc/mec1308/acpi/battery.asl +++ b/src/ec/smsc/mec1308/acpi/battery.asl @@ -133,8 +133,7 @@ Device (BAT0) // Store (SWAB (BTPR), Local1) - If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), - LGreaterEqual (Local1, 0x8000))) { + If (LNotEqual (Local1, 0xFFFFFFFF) && LGreaterEqual (Local1, 0x8000)) { Xor (Local1, 0xFFFF, Local1) Increment (Local1) } @@ -144,13 +143,12 @@ Device (BAT0) // 2: BATTERY REMAINING CAPACITY // Store (SWAB (BTRA), Local1) - If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), - LGreaterEqual (Local1, 0x8000))) { + If (LNotEqual (Local1, 0xFFFFFFFF) && LGreaterEqual (Local1, 0x8000)) { Xor (Local1, 0xFFFF, Local1) Increment (Local1) } - If (LAnd (BFWK, LAnd (ACEX, LNot (Local0)))) { + If (BFWK && ACEX && LNot (Local0)) { // On AC power and battery is neither charging // nor discharging. Linux expects a full battery // to report same capacity as last full charge. @@ -159,8 +157,8 @@ Device (BAT0) // See if within ~3% of full ShiftRight (Local2, 5, Local3) - If (LAnd (LGreater (Local1, Subtract (Local2, Local3)), - LLess (Local1, Add (Local2, Local3)))) + If (LGreater (Local1, Subtract (Local2, Local3)) && + LLess (Local1, Add (Local2, Local3))) { Store (Local2, Local1) } -- cgit v1.2.3