From: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
To: <patches@opensource.cirrus.com>, <sre@kernel.org>,
<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Subject: [PATCH 1/1] power: supply: Introduces bypass charging property
Date: Thu, 4 Nov 2021 08:50:27 -0500 [thread overview]
Message-ID: <20211104135027.2352874-2-rriveram@opensource.cirrus.com> (raw)
In-Reply-To: <20211104135027.2352874-1-rriveram@opensource.cirrus.com>
Adds a POWER_SUPPLY_CHARGE_TYPE_BYPASS option to the POWER_SUPPLY_PROP_CHARGE_TYPE
property to facilitate bypass charging operation.
In bypass charging operation, the charger bypasses the charging path around the
integrated converter allowing for a "smart" wall adaptor to perform the power
conversion externally.
This operational mode is critical for the USB PPS standard of power adaptors and is
becoming a common feature in modern charging ICs such as:
- BQ25980
- BQ25975
- BQ25960
- LN8000
- LN8410
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
---
drivers/power/supply/power_supply_sysfs.c | 1 +
include/linux/power_supply.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index c3d7cbcd4fad..1368e13dc94b 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -89,6 +89,7 @@ static const char * const POWER_SUPPLY_CHARGE_TYPE_TEXT[] = {
[POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE] = "Adaptive",
[POWER_SUPPLY_CHARGE_TYPE_CUSTOM] = "Custom",
[POWER_SUPPLY_CHARGE_TYPE_LONGLIFE] = "Long Life",
+ [POWER_SUPPLY_CHARGE_TYPE_BYPASS] = "Bypass",
};
static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 9ca1f120a211..9432234d7900 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -49,6 +49,7 @@ enum {
POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE, /* dynamically adjusted speed */
POWER_SUPPLY_CHARGE_TYPE_CUSTOM, /* use CHARGE_CONTROL_* props */
POWER_SUPPLY_CHARGE_TYPE_LONGLIFE, /* slow speed, longer life */
+ POWER_SUPPLY_CHARGE_TYPE_BYPASS, /* bypassing the charger */
};
enum {
--
2.25.1
next prev parent reply other threads:[~2021-11-04 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 13:50 [PATCH 0/1] Introduces bypass charge type property Ricardo Rivera-Matos
2021-11-04 13:50 ` Ricardo Rivera-Matos [this message]
2021-11-04 14:44 ` [PATCH 1/1] power: supply: Introduces bypass charging property Sebastian Reichel
2021-11-10 15:52 ` Rivera-Matos, Ricardo
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=20211104135027.2352874-2-rriveram@opensource.cirrus.com \
--to=rriveram@opensource.cirrus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--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