Commit 77d641ba authored by Luca Ceresoli's avatar Luca Ceresoli Committed by Sebastian Reichel
Browse files

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: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent f9a09de3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ Description:
			      "Over voltage", "Unspecified failure", "Cold",
			      "Watchdog timer expire", "Safety timer expire",
			      "Over current", "Calibration required", "Warm",
			      "Cool", "Hot"
			      "Cool", "Hot", "No battery"

What:		/sys/class/power_supply/<supply_name>/precharge_current
Date:		June 2017
+1 −0
Original line number Diff line number Diff line
@@ -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[] = {
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ enum {
	POWER_SUPPLY_HEALTH_WARM,
	POWER_SUPPLY_HEALTH_COOL,
	POWER_SUPPLY_HEALTH_HOT,
	POWER_SUPPLY_HEALTH_NO_BATTERY,
};

enum {