ec/purism/librem: fix battery present rate
EC ACPI code is calculating the drain rate, but does not store it 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@gmail.com> Reviewed-on: https://review.coreboot.org/21545 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Youness Alaoui <snifikino@gmail.com>
This commit is contained in:
parent
d7e0cb93ae
commit
f11d0c3414
|
@ -183,6 +183,11 @@ Device (BAT)
|
|||
} Else {
|
||||
And (Local1, 0x7FFF, Local0)
|
||||
}
|
||||
If(LLess(Local0, 0x0352))
|
||||
{
|
||||
Store(0x0352, Local0)
|
||||
}
|
||||
Store (Local0, Index (PBST, 1))
|
||||
|
||||
/*
|
||||
* 2: BATTERY REMAINING CAPACITY
|
||||
|
|
Loading…
Reference in New Issue