diff options
| author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-05-03 13:00:40 -0400 |
|---|---|---|
| committer | Sebastian Reichel <sre@kernel.org> | 2019-05-03 16:15:51 -0400 |
| commit | e3e83cc601e57aeeea212e1cc37ff9a7ad584aae (patch) | |
| tree | 470b926ad67754e507544a233ac33f9c60a866ad | |
| parent | caee28498ec35f0320a1b1eabbdfa3563cccdf4b (diff) | |
power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant
Add POWER_SUPPLY_HEALTH_OVERCURRENT constant in order to allow
singalling overcurrent condition via power supply health information.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Enric Balletbo Serra <enric.balletbo@collabora.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
| -rw-r--r-- | drivers/power/supply/power_supply_sysfs.c | 2 | ||||
| -rw-r--r-- | include/linux/power_supply.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index 6104a3f03d46..58c74bd417dd 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c | |||
| @@ -62,7 +62,7 @@ static const char * const power_supply_charge_type_text[] = { | |||
| 62 | static const char * const power_supply_health_text[] = { | 62 | static const char * const power_supply_health_text[] = { |
| 63 | "Unknown", "Good", "Overheat", "Dead", "Over voltage", | 63 | "Unknown", "Good", "Overheat", "Dead", "Over voltage", |
| 64 | "Unspecified failure", "Cold", "Watchdog timer expire", | 64 | "Unspecified failure", "Cold", "Watchdog timer expire", |
| 65 | "Safety timer expire" | 65 | "Safety timer expire", "Over current" |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | static const char * const power_supply_technology_text[] = { | 68 | static const char * const power_supply_technology_text[] = { |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index d59205170232..d9c0c094f8a0 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -61,6 +61,7 @@ enum { | |||
| 61 | POWER_SUPPLY_HEALTH_COLD, | 61 | POWER_SUPPLY_HEALTH_COLD, |
| 62 | POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE, | 62 | POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE, |
| 63 | POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE, | 63 | POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE, |
| 64 | POWER_SUPPLY_HEALTH_OVERCURRENT, | ||
| 64 | }; | 65 | }; |
| 65 | 66 | ||
| 66 | enum { | 67 | enum { |
