From: Sebastian Reichel <sre@kernel.org>
To: luoxueqin <luoxueqin@kylinos.cn>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: battery: add state_of_health support to power_supply
Date: Fri, 24 Apr 2026 03:22:53 +0200 [thread overview]
Message-ID: <aerE9b5vE0vBv8Si@venus> (raw)
In-Reply-To: <20260423075853.151829-1-luoxueqin@kylinos.cn>
[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]
Hi,
On Thu, Apr 23, 2026 at 03:58:53PM +0800, luoxueqin wrote:
> From: Xueqin Luo <luoxueqin@kylinos.cn>
>
> 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@vger.kernel.org
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2026-04-24 1:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 7:58 [PATCH] ACPI: battery: add state_of_health support to power_supply luoxueqin
2026-04-24 1:22 ` Sebastian Reichel [this message]
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=aerE9b5vE0vBv8Si@venus \
--to=sre@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luoxueqin@kylinos.cn \
/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