summaryrefslogtreecommitdiff
path: root/src/ec/starlabs/merlin
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2024-07-23 20:10:11 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-07-25 14:12:34 +0000
commita3863ca44a362c64b50149c78b95903d9f134293 (patch)
tree9c9139536bf3b22523455a830386edc6285fc22c /src/ec/starlabs/merlin
parent24e550fd61d58ac639266d5b0d88870f4cd6ba83 (diff)
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>
Diffstat (limited to 'src/ec/starlabs/merlin')
-rw-r--r--src/ec/starlabs/merlin/acpi/battery.asl2
1 files changed, 1 insertions, 1 deletions
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)