]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ACPI: battery: Add support for charge limiting state
authorArmin Wolf <W_Armin@gmx.de>
Thu, 20 Jun 2024 19:14:09 +0000 (21:14 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 1 Jul 2024 17:26:04 +0000 (19:26 +0200)
commit526294e1eb8e43bce5088806abeedeea31018641
tree4dc50d0932aea225dd6f3a6d9370615d3aa16f8e
parent6bad28cfc30988a845fb3f59a99f4b8a4ce8fe95
ACPI: battery: Add support for charge limiting state

The ACPI specification says that bit 3 inside the battery state
signals that the battery is in charge limiting state. In this state,
the platform limits the battery from reaching its full capacity, the
exact limit is platform-specific.

This might explain why a number of batteries reported a "Unknown"
battery state in the past when using platform-specific interfaces to
stop battery charging at a user defined level.

Unfortunately not all platforms set this bit in such cases, so
"non-charging" is still the default state when the battery is neither
charging, discharging or full.

Tested on a Lenovo Ideapad S145-14IWL.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20240620191410.3646-1-W_Armin@gmx.de
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/battery.c