]> www.infradead.org Git - users/dwmw2/linux.git/commit
power: supply: core: Add additional health status values
authorArmin Wolf <W_Armin@gmx.de>
Tue, 29 Apr 2025 00:36:03 +0000 (02:36 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 12 May 2025 10:20:37 +0000 (13:20 +0300)
commitf4856c20c137a73d73e448caa3964098024248bf
treebf801fa3e67ff2f6aba57202dda3e65dc5979c44
parent511a4a5ea2b6f1d4e0c719f27db6b627b2b52e49
power: supply: core: Add additional health status values

Some batteries can signal when an internal fuse was blown. In such a
case POWER_SUPPLY_HEALTH_DEAD is too vague for userspace applications
to perform meaningful diagnostics.

Additionally some batteries can also signal when some of their
internal cells are imbalanced. In such a case returning
POWER_SUPPLY_HEALTH_UNSPEC_FAILURE is again too vague for userspace
applications to perform meaningful diagnostics.

Add new health status values for both cases.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20250429003606.303870-1-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Documentation/ABI/testing/sysfs-class-power
drivers/power/supply/power_supply_sysfs.c
include/linux/power_supply.h