From d382f3d39f8438179822c83bcf643927105dc9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Tue, 6 Apr 2021 23:51:49 +0200 Subject: [PATCH] ec/lenovo/h8/acpi: fix wrong calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The conversion to ASL 2.0 syntax in commit 81d55cf introduced a regression triggering a BUG in Linux when reading the battery current. Correct the wrongly-converted calculation. Fixes: 81d55cf ("src/ec/lenovo/h8/acpi/battery.asl: Convert to ASL 2.0") Tested-by: Andrew A. I. Change-Id: I1cea8f56eb0a674005582c87cad89f10a02d0701 Signed-off-by: Michael Niewöhner Reviewed-on: https://review.coreboot.org/c/coreboot/+/52144 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/ec/lenovo/h8/acpi/battery.asl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ec/lenovo/h8/acpi/battery.asl b/src/ec/lenovo/h8/acpi/battery.asl index d5e8c1296c..ae07540fbc 100644 --- a/src/ec/lenovo/h8/acpi/battery.asl +++ b/src/ec/lenovo/h8/acpi/battery.asl @@ -115,7 +115,7 @@ Method(BSTA, 4, NotSerialized) { Local0 |= 1 // Negate present rate - Local2 -= 0x10000 + Local2 = 0x10000 - Local2 } Else // Full battery, force to 0 {