From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: linux-pm@vger.kernel.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
Guenter Roeck <linux@roeck-us.net>,
Enric Balletbo Serra <enric.balletbo@collabora.com>,
Chris Healy <cphealy@gmail.com>,
Lucas Stach <l.stach@pengutronix.de>,
Fabio Estevam <fabio.estevam@nxp.com>,
Sebastian Reichel <sre@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 1/3] power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant
Date: Mon, 29 Apr 2019 12:53:47 -0700 [thread overview]
Message-ID: <20190429195349.20335-2-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20190429195349.20335-1-andrew.smirnov@gmail.com>
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 <fabio.estevam@nxp.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
---
drivers/power/supply/power_supply_sysfs.c | 2 +-
include/linux/power_supply.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index 5358a80d854f..153f4a6ca57c 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[] = {
static const char * const power_supply_health_text[] = {
"Unknown", "Good", "Overheat", "Dead", "Over voltage",
"Unspecified failure", "Cold", "Watchdog timer expire",
- "Safety timer expire"
+ "Safety timer expire", "Over current"
};
static const char * const power_supply_technology_text[] = {
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 2f9c201a54d1..bdab14c7ca4d 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -57,6 +57,7 @@ enum {
POWER_SUPPLY_HEALTH_COLD,
POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,
POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,
+ POWER_SUPPLY_HEALTH_OVERCURRENT,
};
enum {
--
2.20.1
next prev parent reply other threads:[~2019-04-29 19:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 19:53 [PATCH v3 0/3] Driver for UCS1002 Andrey Smirnov
2019-04-29 19:53 ` Andrey Smirnov
2019-04-29 19:53 ` Andrey Smirnov [this message]
2019-04-29 19:53 ` [PATCH v3 1/3] power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant Andrey Smirnov
2019-04-29 19:53 ` [PATCH v3 2/3] power: supply: Add driver for Microchip UCS1002 Andrey Smirnov
2019-04-29 19:53 ` Andrey Smirnov
2019-04-29 20:36 ` Guenter Roeck
2019-04-29 20:36 ` Guenter Roeck
2019-04-30 1:16 ` Andrey Smirnov
2019-04-30 1:16 ` Andrey Smirnov
2019-04-29 19:53 ` [PATCH v3 3/3] dt-bindings: power: supply: Add bindings " Andrey Smirnov
2019-04-29 19:53 ` Andrey Smirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190429195349.20335-2-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=cphealy@gmail.com \
--cc=enric.balletbo@collabora.com \
--cc=fabio.estevam@nxp.com \
--cc=l.stach@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox