From: Dzmitry Sankouski <dsankouski@gmail.com>
To: Sebastian Reichel <sre@kernel.org>,
Chanwoo Choi <cw00.choi@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Pavel Machek <pavel@ucw.cz>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-input@vger.kernel.org,
linux-leds@vger.kernel.org,
Dzmitry Sankouski <dsankouski@gmail.com>
Subject: [PATCH v6 1/7] power: supply: add undervoltage health status property
Date: Mon, 07 Oct 2024 18:55:49 +0300 [thread overview]
Message-ID: <20241007-starqltechn_integration_upstream-v6-1-0d38b5090c57@gmail.com> (raw)
In-Reply-To: <20241007-starqltechn_integration_upstream-v6-0-0d38b5090c57@gmail.com>
Add POWER_SUPPLY_HEALTH_UNDERVOLTAGE status for power supply
to report under voltage lockout failures.
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Changes for v5:
- update Documentation/ABI/testing/sysfs-class-power and
drivers/power/supply/power_supply_sysfs.c
---
Documentation/ABI/testing/sysfs-class-power | 2 +-
drivers/power/supply/power_supply_sysfs.c | 1 +
include/linux/power_supply.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
index 45180b62d426..32c018c5d088 100644
--- a/Documentation/ABI/testing/sysfs-class-power
+++ b/Documentation/ABI/testing/sysfs-class-power
@@ -433,7 +433,7 @@ Description:
Valid values:
"Unknown", "Good", "Overheat", "Dead",
- "Over voltage", "Unspecified failure", "Cold",
+ "Over voltage", "Under voltage", "Unspecified failure", "Cold",
"Watchdog timer expire", "Safety timer expire",
"Over current", "Calibration required", "Warm",
"Cool", "Hot", "No battery"
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index 16b3c5880cd8..82b2275de465 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -99,6 +99,7 @@ static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
[POWER_SUPPLY_HEALTH_OVERHEAT] = "Overheat",
[POWER_SUPPLY_HEALTH_DEAD] = "Dead",
[POWER_SUPPLY_HEALTH_OVERVOLTAGE] = "Over voltage",
+ [POWER_SUPPLY_HEALTH_UNDERVOLTAGE] = "Under voltage",
[POWER_SUPPLY_HEALTH_UNSPEC_FAILURE] = "Unspecified failure",
[POWER_SUPPLY_HEALTH_COLD] = "Cold",
[POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE] = "Watchdog timer expire",
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 910d407ebe63..8682e6466544 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -58,6 +58,7 @@ enum {
POWER_SUPPLY_HEALTH_OVERHEAT,
POWER_SUPPLY_HEALTH_DEAD,
POWER_SUPPLY_HEALTH_OVERVOLTAGE,
+ POWER_SUPPLY_HEALTH_UNDERVOLTAGE,
POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,
POWER_SUPPLY_HEALTH_COLD,
POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,
--
2.39.2
next prev parent reply other threads:[~2024-10-07 15:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 15:55 [PATCH v6 0/7] Add support for Maxim Integrated MAX77705 MFD Dzmitry Sankouski
2024-10-07 15:55 ` Dzmitry Sankouski [this message]
2024-10-07 15:55 ` [PATCH v6 2/7] dt-bindings: mfd: add maxim,max77705 Dzmitry Sankouski
2024-10-07 20:07 ` Rob Herring (Arm)
2024-10-07 15:55 ` [PATCH v6 3/7] mfd: Add new driver for MAX77705 PMIC Dzmitry Sankouski
2024-10-15 14:02 ` Lee Jones
2024-10-21 15:04 ` Dzmitry Sankouski
2024-10-25 8:57 ` Lee Jones
2024-10-22 8:37 ` Dzmitry Sankouski
2024-10-07 15:55 ` [PATCH v6 4/7] input: max77693: add max77705 haptic support Dzmitry Sankouski
2024-10-07 15:55 ` [PATCH v6 5/7] power: supply: max77705: Add charger driver for Maxim 77705 Dzmitry Sankouski
2024-10-16 9:24 ` Uwe Kleine-König
2024-10-07 15:55 ` [PATCH v6 6/7] power: supply: max77705: Add fuel gauge " Dzmitry Sankouski
2024-10-10 20:45 ` kernel test robot
2024-10-11 11:34 ` kernel test robot
2024-10-11 19:23 ` kernel test robot
2024-10-07 15:55 ` [PATCH v6 7/7] leds: max77705: Add LEDs support Dzmitry Sankouski
2024-10-15 14:33 ` Lee Jones
2024-10-22 15:00 ` Dzmitry Sankouski
2024-10-25 8:55 ` Lee Jones
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=20241007-starqltechn_integration_upstream-v6-1-0d38b5090c57@gmail.com \
--to=dsankouski@gmail.com \
--cc=conor+dt@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).