Daisuke Nojiri has uploaded this change for review. ( https://review.coreboot.org/29364
Change subject: chromeec: Remove battery remaining capacity workaround ......................................................................
chromeec: Remove battery remaining capacity workaround
Power manager (powerd) reads the remaining capacity and full capacity from EC through ACPI. Gas gauges typically perform charge-discharge cycle when the charge is nearly full to avoid stressing battery packs at high charge.
ACPI converts remaining capacity readings to the full capacity to mask this fluctuation from the user but this can be also done by power manager.
This patch removes this compensation from ACPI so that power manager can solely handle it.
BUG=b:109954565,chromium:899120 BRANCH=none TEST=Verify LED changes from amber (charging) to white (full) at the same time as the display shows battery is full.
Change-Id: I15d585229948a0be4b59a9c653d8524d05c3a90d Signed-off-by: Daisuke Nojiri dnojiri@chromium.org --- M src/ec/google/chromeec/acpi/battery.asl 1 file changed, 1 insertion(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/29364/1
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index 0a0caec..3b7ef97 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -214,23 +214,7 @@ // // 2: BATTERY REMAINING CAPACITY // - Store (BTRA, Local1) - If (LAnd (Arg3, LAnd (ACEX, LNot (LAnd (BFDC, BFCG))))) { - // On AC power and battery is neither charging - // nor discharging. Linux expects a full battery - // to report same capacity as last full charge. - // https://bugzilla.kernel.org/show_bug.cgi?id=12632 - Store (BTDF, Local2) - - // See if within ~6% of full - ShiftRight (Local2, 4, Local3) - If (LAnd (LGreater (Local1, Subtract (Local2, Local3)), - LLess (Local1, Add (Local2, Local3)))) - { - Store (Local2, Local1) - } - } - Store (Local1, Index (Arg1, 2)) + Store (BTRA, Index (Arg1, 2))
// // 3: BATTERY PRESENT VOLTAGE