Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/83619?usp=email )
Change subject: ec/starlabs/merlin: Improve accuracy of RSOC ......................................................................
ec/starlabs/merlin: Improve accuracy of RSOC
Multiply before dividing to improve accuracy of the result.
Change-Id: I974cad3af4e1f86ae58e90c68db463fc436223af Signed-off-by: Sean Rhodes sean@starlabs.systems Reviewed-on: https://review.coreboot.org/c/coreboot/+/83619 Reviewed-by: Matt DeVillier matt.devillier@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/starlabs/merlin/acpi/battery.asl 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Matt DeVillier: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/ec/starlabs/merlin/acpi/battery.asl b/src/ec/starlabs/merlin/acpi/battery.asl index 63f4601..e6b0964 100644 --- a/src/ec/starlabs/merlin/acpi/battery.asl +++ b/src/ec/starlabs/merlin/acpi/battery.asl @@ -122,7 +122,7 @@ If (B1RC != 0xffff) { PKG1[2] = B1RC } Else { - PKG1[2] = B1RP * (B1DC / 100) + PKG1[2] = (B1RP * B1DC) / 100 } PKG1[3] = B1PV Return (PKG1)