]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ACPI: battery: Accept charges over the design capacity as full
authorAndré Almeida <andrealmeid@collabora.com>
Fri, 8 Oct 2021 03:05:29 +0000 (00:05 -0300)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:16 +0000 (09:48 +0100)
commitce69f381fe884fdc5b338e33994d85034b9a8328
tree47c754a41d939b43ddd07f5c16f683797987d2bc
parent48bb71934d28d77126df2769d38245fa4e7064b7
ACPI: battery: Accept charges over the design capacity as full

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 2835f327bd1240508db2c89fe94a056faa53c49a ]

Some buggy firmware and/or brand new batteries can support a charge that's
slightly over the reported design capacity. In such cases, the kernel will
report to userspace that the charging state of the battery is "Unknown",
when in reality the battery charge is "Full", at least from the design
capacity point of view. Make the fallback condition accepts capacities
over the designed capacity so userspace knows that is full.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/acpi/battery.c