diff options
author | Felix Singer <felixsinger@posteo.net> | 2021-12-29 15:37:08 +0100 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2021-12-30 16:22:53 +0000 |
commit | 83ba290f6db1f679179023ff9984c1ac31af7430 (patch) | |
tree | 8011d748b4d3f825b06af1a4b1311fd1b1cf7c5e /src/ec | |
parent | 6b0b1aafe76ea67387b16f526e20571b150bcdb1 (diff) |
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 <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60463
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src/ec')
-rw-r--r-- | src/ec/smsc/mec1308/acpi/battery.asl | 12 |
1 files changed, 5 insertions, 7 deletions
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) } |