From a3863ca44a362c64b50149c78b95903d9f134293 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Tue, 23 Jul 2024 20:10:11 +0100 Subject: ec/starlabs/merlin: Improve accuracy of RSOC Multiply before dividing to improve accuracy of the result. Change-Id: I974cad3af4e1f86ae58e90c68db463fc436223af Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/83619 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/ec/starlabs/merlin/acpi/battery.asl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ec') diff --git a/src/ec/starlabs/merlin/acpi/battery.asl b/src/ec/starlabs/merlin/acpi/battery.asl index 63f46013a3..e6b0964207 100644 --- a/src/ec/starlabs/merlin/acpi/battery.asl +++ b/src/ec/starlabs/merlin/acpi/battery.asl @@ -122,7 +122,7 @@ Device (BAT0) If (B1RC != 0xffff) { PKG1[2] = B1RC } Else { - PKG1[2] = B1RP * (B1DC / 100) + PKG1[2] = (B1RP * B1DC) / 100 } PKG1[3] = B1PV Return (PKG1) -- cgit v1.2.3