Skip to content

acpi: battery: Accept charges over the design capacity as full

André Almeida linux-acpi lkml 1 version Applied

Status from this message: Applied as 5.16 material, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/1acpi: battery: Accept charges over the design capacity as fulldrivers/acpi/battery.c+1 -13 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchHans de GoedeSebastian Reichel
1/1R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/1] acpi: battery: Accept charges over the design capacity as full

Hi,

We have come across a battery that, when brand new, can go above the reported maximum charge, leading to reports like this:

$ cat /sys/class/power_supply/BAT1/uevent

POWER_SUPPLY_NAME=BAT1
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Unknown
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_CHARGE_FULL_DESIGN=4160000
POWER_SUPPLY_CHARGE_FULL=4538000
POWER_SUPPLY_CHARGE_NOW=4539000
POWER_SUPPLY_CAPACITY=100
POWER_SUPPLY_CAPACITY_LEVEL=Full
[...]

And then userspace get confused by Unknown and some programs even say "Charging: 100%". After applying this patch, kernel reports "Full", which for practical reasons is true, even if the battery will charge a bit more. After some time, the battery health degrades and the maximum charge meets the design expectation. Ideally this would be fixed in the battery firmware, but it's not always possible to do that.

André Almeida (1):
acpi: battery: Accept charges over the design capacity as full

 drivers/acpi/battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.33.0