[PATCH 2/4] power: supply: Add liquid detection to health property enum
From: Waqar Hameed
Date: Wed Oct 28 2026 - 18:00:13 EST
There are devices that can detect liquid. For example, moisture in a
port. To be able to report this state for such devices, add "liquid
detected" to the health property enum.
Signed-off-by: Waqar Hameed <waqar.hameed@xxxxxxxx>
---
Documentation/ABI/testing/sysfs-class-power | 3 ++-
drivers/power/supply/power_supply_sysfs.c | 1 +
include/linux/power_supply.h | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
index a98e6b2a75fbc..fdc6cd543c229 100644
--- a/Documentation/ABI/testing/sysfs-class-power
+++ b/Documentation/ABI/testing/sysfs-class-power
@@ -460,7 +460,8 @@ Description:
"Over voltage", "Under voltage", "Unspecified failure", "Cold",
"Watchdog timer expire", "Safety timer expire",
"Over current", "Calibration required", "Warm",
- "Cool", "Hot", "No battery", "Blown fuse", "Cell imbalance"
+ "Cool", "Hot", "No battery", "Blown fuse", "Cell imbalance",
+ "Liquid detected"
What: /sys/class/power_supply/<supply_name>/precharge_current
Date: June 2017
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index 661b42adf6efc..d851e655f8414 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -114,6 +114,7 @@ static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
[POWER_SUPPLY_HEALTH_NO_BATTERY] = "No battery",
[POWER_SUPPLY_HEALTH_BLOWN_FUSE] = "Blown fuse",
[POWER_SUPPLY_HEALTH_CELL_IMBALANCE] = "Cell imbalance",
+ [POWER_SUPPLY_HEALTH_LIQUID_DETECTED] = "Liquid detected",
};
static const char * const POWER_SUPPLY_TECHNOLOGY_TEXT[] = {
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 8e5bbdfebe794..7fbc0b80bcbb6 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -73,6 +73,7 @@ enum {
POWER_SUPPLY_HEALTH_NO_BATTERY,
POWER_SUPPLY_HEALTH_BLOWN_FUSE,
POWER_SUPPLY_HEALTH_CELL_IMBALANCE,
+ POWER_SUPPLY_HEALTH_LIQUID_DETECTED,
};
enum {
--
2.43.0