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>
This commit is contained in:
Michael Niewöhner 2021-04-06 23:51:49 +02:00
parent 8d1a7a01c7
commit d382f3d39f
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ Method(BSTA, 4, NotSerialized)
{
Local0 |= 1
// Negate present rate
Local2 -= 0x10000
Local2 = 0x10000 - Local2
}
Else // Full battery, force to 0
{