public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Introduces bypass charge type property
@ 2021-11-04 13:50 Ricardo Rivera-Matos
  2021-11-04 13:50 ` [PATCH 1/1] power: supply: Introduces bypass charging property Ricardo Rivera-Matos
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Rivera-Matos @ 2021-11-04 13:50 UTC (permalink / raw)
  To: patches, sre, linux-pm, linux-kernel; +Cc: Ricardo Rivera-Matos

Hello,

This patch series introduces a new POWER_SUPPLY_CHARGE_TYPE for bypass charging
operation.

In fast charging ICs, the bypass operation is used to bypass the charging path
around the charging IC's integrated power converter to its load. This allows
for "smart" wall adaptors (such as USB PPS standard power adaptors) to handle
the power conversion and heat dissipation externally.

Best Regards,
Ricardo

Ricardo Rivera-Matos (1):
  power: supply: Introduces bypass charging property

 drivers/power/supply/power_supply_sysfs.c | 1 +
 include/linux/power_supply.h              | 1 +
 2 files changed, 2 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] power: supply: Introduces bypass charging property
  2021-11-04 13:50 [PATCH 0/1] Introduces bypass charge type property Ricardo Rivera-Matos
@ 2021-11-04 13:50 ` Ricardo Rivera-Matos
  2021-11-04 14:44   ` Sebastian Reichel
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Rivera-Matos @ 2021-11-04 13:50 UTC (permalink / raw)
  To: patches, sre, linux-pm, linux-kernel; +Cc: Ricardo Rivera-Matos

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] power: supply: Introduces bypass charging property
  2021-11-04 13:50 ` [PATCH 1/1] power: supply: Introduces bypass charging property Ricardo Rivera-Matos
@ 2021-11-04 14:44   ` Sebastian Reichel
  2021-11-10 15:52     ` Rivera-Matos, Ricardo
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Reichel @ 2021-11-04 14:44 UTC (permalink / raw)
  To: Ricardo Rivera-Matos; +Cc: patches, linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]

Hi,

On Thu, Nov 04, 2021 at 08:50:27AM -0500, Ricardo Rivera-Matos wrote:
> 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>
> ---

Please always send API changes together with a user (e.g. in this
case you could update bq25980_charger driver to use this property).

-- Sebastian

>  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
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] power: supply: Introduces bypass charging property
  2021-11-04 14:44   ` Sebastian Reichel
@ 2021-11-10 15:52     ` Rivera-Matos, Ricardo
  0 siblings, 0 replies; 4+ messages in thread
From: Rivera-Matos, Ricardo @ 2021-11-10 15:52 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: patches, linux-pm, linux-kernel

Hello,

> On Nov 4, 2021, at 9:44 AM, Sebastian Reichel <sebastian.reichel@collabora.com> wrote:
> 
> Hi,
> 
> On Thu, Nov 04, 2021 at 08:50:27AM -0500, Ricardo Rivera-Matos wrote:
>> 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>
>> ---
> 
> Please always send API changes together with a user (e.g. in this
> case you could update bq25980_charger driver to use this property).

Ack, I will send out a v2 patch series with an update to the bq25980_charger driver.
> 
> — Sebastian

Best Regards,
Ricardo
> 
>> 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
>> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-10 15:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-04 13:50 [PATCH 0/1] Introduces bypass charge type property Ricardo Rivera-Matos
2021-11-04 13:50 ` [PATCH 1/1] power: supply: Introduces bypass charging property Ricardo Rivera-Matos
2021-11-04 14:44   ` Sebastian Reichel
2021-11-10 15:52     ` Rivera-Matos, Ricardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox