mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@collabora.com>
To: rjw@rjwysocki.net, lenb@kernel.org, linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@collabora.com,
	krisman@collabora.com, sebastian.reichel@collabora.com,
	pgriffais@valvesoftware.com, hdegoede@redhat.com,
	"André Almeida" <andrealmeid@collabora.com>
Subject: [PATCH 0/1] acpi: battery: Accept charges over the design capacity as full
Date: Fri,  8 Oct 2021 00:05:28 -0300	[thread overview]
Message-ID: <20211008030529.223682-1-andrealmeid@collabora.com> (raw)

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


             reply	other threads:[~2021-10-08  3:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  3:05 André Almeida [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211008030529.223682-1-andrealmeid@collabora.com \
    --to=andrealmeid@collabora.com \
    --cc=hdegoede@redhat.com \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pgriffais@valvesoftware.com \
    --cc=rjw@rjwysocki.net \
    --cc=sebastian.reichel@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®