Skip to content

Commit 98cc1b9

Browse files
Dan Murphysre
authored andcommitted
power_supply: Add additional health properties to the header
Add HEALTH_WARM, HEALTH_COOL and HEALTH_HOT to the health enum. HEALTH_WARM, HEALTH_COOL, and HEALTH_HOT properties are taken from JEITA specification JISC8712:2015 Acked-by: Andrew F. Davis <[email protected]> Tested-by: Guru Das Srinagesh <[email protected]> Signed-off-by: Dan Murphy <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 5d809cb commit 98cc1b9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Documentation/ABI/testing/sysfs-class-power

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ Description:
205205
Valid values: "Unknown", "Good", "Overheat", "Dead",
206206
"Over voltage", "Unspecified failure", "Cold",
207207
"Watchdog timer expire", "Safety timer expire",
208-
"Over current", "Calibration required"
208+
"Over current", "Calibration required", "Warm",
209+
"Cool", "Hot"
209210

210211
What: /sys/class/power_supply/<supply_name>/precharge_current
211212
Date: June 2017

drivers/power/supply/power_supply_sysfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
101101
[POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE] = "Safety timer expire",
102102
[POWER_SUPPLY_HEALTH_OVERCURRENT] = "Over current",
103103
[POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED] = "Calibration required",
104+
[POWER_SUPPLY_HEALTH_WARM] = "Warm",
105+
[POWER_SUPPLY_HEALTH_COOL] = "Cool",
106+
[POWER_SUPPLY_HEALTH_HOT] = "Hot",
104107
};
105108

106109
static const char * const POWER_SUPPLY_TECHNOLOGY_TEXT[] = {

include/linux/power_supply.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ enum {
6262
POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,
6363
POWER_SUPPLY_HEALTH_OVERCURRENT,
6464
POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED,
65+
POWER_SUPPLY_HEALTH_WARM,
66+
POWER_SUPPLY_HEALTH_COOL,
67+
POWER_SUPPLY_HEALTH_HOT,
6568
};
6669

6770
enum {

0 commit comments

Comments
 (0)