Skip to content

Commit df998c2

Browse files
Dzmitry Sankouskisre
authored andcommitted
power: supply: add undervoltage health status property
Add POWER_SUPPLY_HEALTH_UNDERVOLTAGE status for power supply to report under voltage lockout failures. Signed-off-by: Dzmitry Sankouski <[email protected]> Link: https://lore.kernel.org/r/20250108-starqltechn_integration_upstream-v14-1-f6e84ec20d96@gmail.com Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 0cd4f1f commit df998c2

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
@@ -453,7 +453,7 @@ Description:
453453

454454
Valid values:
455455
"Unknown", "Good", "Overheat", "Dead",
456-
"Over voltage", "Unspecified failure", "Cold",
456+
"Over voltage", "Under voltage", "Unspecified failure", "Cold",
457457
"Watchdog timer expire", "Safety timer expire",
458458
"Over current", "Calibration required", "Warm",
459459
"Cool", "Hot", "No battery"

drivers/power/supply/power_supply_sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
9999
[POWER_SUPPLY_HEALTH_OVERHEAT] = "Overheat",
100100
[POWER_SUPPLY_HEALTH_DEAD] = "Dead",
101101
[POWER_SUPPLY_HEALTH_OVERVOLTAGE] = "Over voltage",
102+
[POWER_SUPPLY_HEALTH_UNDERVOLTAGE] = "Under voltage",
102103
[POWER_SUPPLY_HEALTH_UNSPEC_FAILURE] = "Unspecified failure",
103104
[POWER_SUPPLY_HEALTH_COLD] = "Cold",
104105
[POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE] = "Watchdog timer expire",

include/linux/power_supply.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ enum {
6060
POWER_SUPPLY_HEALTH_OVERHEAT,
6161
POWER_SUPPLY_HEALTH_DEAD,
6262
POWER_SUPPLY_HEALTH_OVERVOLTAGE,
63+
POWER_SUPPLY_HEALTH_UNDERVOLTAGE,
6364
POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,
6465
POWER_SUPPLY_HEALTH_COLD,
6566
POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,

0 commit comments

Comments
 (0)