[coreboot-gerrit] Change in coreboot[master]: ec/purism/librem: fix battery present rate

Matt DeVillier (Code Review) gerrit at coreboot.org
Fri Sep 15 06:31:36 CEST 2017


Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/21545


Change subject: ec/purism/librem: fix battery present rate
......................................................................

ec/purism/librem: fix battery present rate

EC ACPI code was calculating the drain rate, but not storing in
the battery status package before returning it.  Correct this
omission, and set the drain rate to a preset minimum if calculated
value is less.  Taken from vendor firmware ACPI dump.

Change-Id: I52837d5879112ab3103976bda28906fac8f880ec
Signed-off-by: Matt DeVillier <matt.devillier at gmail.com>
---
M src/ec/purism/librem/acpi/battery.asl
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/21545/1

diff --git a/src/ec/purism/librem/acpi/battery.asl b/src/ec/purism/librem/acpi/battery.asl
index a090b7c..5a4891e 100644
--- a/src/ec/purism/librem/acpi/battery.asl
+++ b/src/ec/purism/librem/acpi/battery.asl
@@ -183,6 +183,11 @@
 		} Else {
 			And (Local1, 0x7FFF, Local0)
 		}
+		If(LLess(Local0, 0x0352))
+		{
+			Store(0x0352, Local0)
+		}
+		Store (Local0, Index (PBST, 1))
 
 		/*
 		 * 2: BATTERY REMAINING CAPACITY

-- 
To view, visit https://review.coreboot.org/21545
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I52837d5879112ab3103976bda28906fac8f880ec
Gerrit-Change-Number: 21545
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170915/c5b1f874/attachment.html>


More information about the coreboot-gerrit mailing list