Michael Niewöhner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52144 )
Change subject: ec/lenovo/h8/acpi: fix wrong calculation ......................................................................
ec/lenovo/h8/acpi: fix wrong calculation
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. aidron@yandex.ru Change-Id: I1cea8f56eb0a674005582c87cad89f10a02d0701 Signed-off-by: Michael Niewöhner foss@mniewoehner.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/52144 Reviewed-by: Angel Pons th3fanbus@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/lenovo/h8/acpi/battery.asl 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/ec/lenovo/h8/acpi/battery.asl b/src/ec/lenovo/h8/acpi/battery.asl index d5e8c12..ae07540 100644 --- a/src/ec/lenovo/h8/acpi/battery.asl +++ b/src/ec/lenovo/h8/acpi/battery.asl @@ -115,7 +115,7 @@ { Local0 |= 1 // Negate present rate - Local2 -= 0x10000 + Local2 = 0x10000 - Local2 } Else // Full battery, force to 0 {