Re: [PATCH] ACPI: battery: add state_of_health support to power_supply

From: Sebastian Reichel

Date: Thu Apr 23 2026 - 21:23:06 EST


Hi,

On Thu, Apr 23, 2026 at 03:58:53PM +0800, luoxueqin wrote:
> From: Xueqin Luo <luoxueqin@xxxxxxxxxx>
>
> Add support for POWER_SUPPLY_PROP_STATE_OF_HEALTH in ACPI battery
> driver.
>
> State of Health is calculated as the ratio between full charge capacity
> and design capacity, expressed as a percentage.
>
> The value is computed as:
> SOH = full_charge_capacity * 100 / design_capacity

$ grep -A15 state_of_health Documentation/ABI/testing/sysfs-class-power
What: /sys/class/power_supply/<supply_name>/state_of_health
Date: August 2025
Contact: linux-arm-msm@xxxxxxxxxxxxxxx
Description:
The state_of_health parameter quantifies the overall condition
of a battery as a percentage, reflecting its ability to deliver
rated performance relative to its original specifications. It is
dynamically computed using a combination of learned capacity
and impedance-based degradation indicators, both of which evolve
over the battery's lifecycle.
Note that the exact algorithms are kept secret by most battery
vendors and the value from different battery vendors cannot be
compared with each other as there is no vendor-agnostic definition
of "performance". Also this usually cannot be used for any
calculations (i.e. this is not the factor between charge_full and
charge_full_design).

Access: Read

Valid values: 0 - 100 (percent)

Greetings,

-- Sebastian

Attachment: signature.asc
Description: PGP signature