linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] acpi: battery: Accept charges over the design capacity as full
@ 2021-10-08  3:05 André Almeida
  2021-10-08  3:05 ` [PATCH 1/1] " André Almeida
  0 siblings, 1 reply; 5+ messages in thread
From: André Almeida @ 2021-10-08  3:05 UTC (permalink / raw)
  To: rjw, lenb, linux-acpi
  Cc: linux-kernel, kernel, krisman, sebastian.reichel, pgriffais,
	hdegoede, André Almeida

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(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-13 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  3:05 [PATCH 0/1] acpi: battery: Accept charges over the design capacity as full André Almeida
2021-10-08  3:05 ` [PATCH 1/1] " André Almeida
2021-10-08  6:58   ` Hans de Goede
2021-10-13 11:33   ` Sebastian Reichel
2021-10-13 17:54     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).