Skip to content

Commit 601c2a5

Browse files
committed
power: supply: core: add POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED
Some battery fuel gauges know when the battery needs to be recalibrated before providing usable values. This should be reported via the health property. Signed-off-by: Sebastian Reichel <[email protected]>
1 parent feabe49 commit 601c2a5

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

Documentation/ABI/testing/sysfs-class-power

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

210210
What: /sys/class/power_supply/<supply_name>/precharge_current
211211
Date: June 2017

drivers/power/supply/power_supply_sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
100100
[POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE] = "Watchdog timer expire",
101101
[POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE] = "Safety timer expire",
102102
[POWER_SUPPLY_HEALTH_OVERCURRENT] = "Over current",
103+
[POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED] = "Calibration required",
103104
};
104105

105106
static const char * const POWER_SUPPLY_TECHNOLOGY_TEXT[] = {

include/linux/power_supply.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ enum {
6161
POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,
6262
POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,
6363
POWER_SUPPLY_HEALTH_OVERCURRENT,
64+
POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED,
6465
};
6566

6667
enum {

0 commit comments

Comments
 (0)