power_supply: Add additional health properties to the header
authorDan Murphy <dmurphy@ti.com>
Mon, 20 Jul 2020 20:43:57 +0000 (15:43 -0500)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 21 Jul 2020 20:19:37 +0000 (22:19 +0200)
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 <afd@ti.com>
Tested-by: Guru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Documentation/ABI/testing/sysfs-class-power
drivers/power/supply/power_supply_sysfs.c
include/linux/power_supply.h

index 216d61a22f1e72cadb1961fc3ad8a774fcb7395d..40213c73bc9c45388085367c062b933adbfce163 100644 (file)
@@ -205,7 +205,8 @@ Description:
                Valid values: "Unknown", "Good", "Overheat", "Dead",
                              "Over voltage", "Unspecified failure", "Cold",
                              "Watchdog timer expire", "Safety timer expire",
-                             "Over current", "Calibration required"
+                             "Over current", "Calibration required", "Warm",
+                             "Cool", "Hot"
 
 What:          /sys/class/power_supply/<supply_name>/precharge_current
 Date:          June 2017
index af0cad253f52145002d51410b081d5d419eb9d12..b903cb4dca2be293d4cacc77a2894a5bc29aec16 100644 (file)
@@ -101,6 +101,9 @@ static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
        [POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE]   = "Safety timer expire",
        [POWER_SUPPLY_HEALTH_OVERCURRENT]           = "Over current",
        [POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED]  = "Calibration required",
+       [POWER_SUPPLY_HEALTH_WARM]                  = "Warm",
+       [POWER_SUPPLY_HEALTH_COOL]                  = "Cool",
+       [POWER_SUPPLY_HEALTH_HOT]                   = "Hot",
 };
 
 static const char * const POWER_SUPPLY_TECHNOLOGY_TEXT[] = {
index ac1345a48ad051737ed2355f94e68fbaae9e2131..b5ee35d3c3046cf4c0309bd2ce268e88163c3b1e 100644 (file)
@@ -62,6 +62,9 @@ enum {
        POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,
        POWER_SUPPLY_HEALTH_OVERCURRENT,
        POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED,
+       POWER_SUPPLY_HEALTH_WARM,
+       POWER_SUPPLY_HEALTH_COOL,
+       POWER_SUPPLY_HEALTH_HOT,
 };
 
 enum {