summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2021-11-08 19:27:05 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-11-16 18:10:07 +0300
commit77d641baa3c8e18a1056bec6c64c6103c1a17b1e (patch)
tree574e1021337ba441fa1c771bcc7c17ba403b9fcb /drivers
parentf9a09de33b47a8ac9a128fea54a549dddf87c6b4 (diff)
downloadlinux-77d641baa3c8e18a1056bec6c64c6103c1a17b1e.tar.xz
power: supply: core: add POWER_SUPPLY_HEALTH_NO_BATTERY
Some chargers can keep the system powered from the mains even when no battery is present. It this case none of the currently defined health statuses applies. Add a new status to report that no battery is present. Suggested-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/supply/power_supply_sysfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index c3d7cbcd4fad..6ac88fbee3cb 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -106,6 +106,7 @@ static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
[POWER_SUPPLY_HEALTH_WARM] = "Warm",
[POWER_SUPPLY_HEALTH_COOL] = "Cool",
[POWER_SUPPLY_HEALTH_HOT] = "Hot",
+ [POWER_SUPPLY_HEALTH_NO_BATTERY] = "No battery",
};
static const char * const POWER_SUPPLY_TECHNOLOGY_TEXT[] = {