Introduces bypass charge type property
v2 cover Introduces bypass charge type property
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 (2):
power: supply: Introduces bypass charging property
power: supply: bq25980: Implements POWER_SUPPLY_CHARGE_TYPE_BYPASS
drivers/power/supply/bq25980_charger.c | 2 +- drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1
PATCH RESEND v2 1/2 power: supply: Introduces bypass charging property
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
--- drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 2 files changed, 2 insertions(+)
drivers/power/supply/power_supply_sysfs.c +1 -0
@@ -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 [] = {
include/linux/power_supply.h +1 -0
@@ -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 {
Signature · 1 line
2.25.1
Re: [RESEND v2 1/2] power: supply: Introduces bypass charging property
Hi,
Quoted 10 lines · Ricardo Rivera-Matos
Adds a
POWER_SUPPLY_CHARGE_TYPE_BYPASSoption to thePOWER_SUPPLY_PROP_CHARGE_TYPEproperty 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:
Quoted 8 lines
- BQ25980
- BQ25975
- BQ25960
- LN8000
- LN8410Signed-off-by Ricardo Rivera-Matos <[email protected]>---
Sorry for the wait. This needs to update the sysfs ABI documentation:
Documentation/ABI/testing/sysfs-class-power
I think your patch description is a good explanation for that file. Also I obviously missed to point this out for the "Long Life" charge type, so please also add a sentence for that so that the property is properly documented.
(Otherwise the patchset looks fine to me)
Thanks,
-- Sebastian
Quoted 31 lines
drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 2 files changed, 2 insertions(+)drivers/power/supply/power_supply_sysfs.c +1
-0@@ -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 [] = {include/linux/power_supply.h +1
-0@@ -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 {Signature · 1 line
2.25.1
Re: [RESEND v2 1/2] power: supply: Introduces bypass charging property
Sebastian,
Quoted 21 lines · Sebastian Reichel
Hi,
Quoted 16 lines · Ricardo Rivera-Matos
Adds a
POWER_SUPPLY_CHARGE_TYPE_BYPASSoption to thePOWER_SUPPLY_PROP_CHARGE_TYPEproperty 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
Quoted 6 lines
Quoted 2 lines
Signed-off-by Ricardo Rivera-Matos <[email protected]>---
Sorry for the wait. This needs to update the sysfs ABI documentation:
Documentation/ABI/testing/sysfs-class-power
Ack
Quoted 5 lines
I think your patch description is a good explanation for that file. Also I obviously missed to point this out for the "Long Life" charge type, so please also add a sentence for that so that the property is properly documented.
As I understand it “Long Life” means the charger reduces its charging rate in order to prolong the battery health.
Is this a fit explanation?
Quoted 6 lines
(Otherwise the patchset looks fine to me)
Thanks,
-- Sebastian
Best Regards,
Ricardo
<snip>
Re: [RESEND v2 1/2] power: supply: Introduces bypass charging property
Hi,
Quoted 9 lines · Ricardo
Quoted 4 lines
I think your patch description is a good explanation for that file. Also I obviously missed to point this out for the "Long Life" charge type, so please also add a sentence for that so that the property is properly documented.
As I understand it “Long Life” means the charger reduces its charging rate in order to prolong the battery health.
Is this a fit explanation?
Yes, thanks for taking care of it.
-- Sebastian
Re: [RESEND v2 1/2] power: supply: Introduces bypass charging property
Hello,
Quoted 10 lines · Sebastian Reichel
Hi,
Quoted 5 lines · Ricardo
Quoted 4 lines
I think your patch description is a good explanation for that file. Also I obviously missed to point this out for the "Long Life" charge type, so please also add a sentence for that so that the property is properly documented.
Quoted 6 lines
Quoted 4 lines
As I understand it “Long Life” means the charger reduces its charging rate in order to prolong the battery health.
Is this a fit explanation?
Yes, thanks for taking care of it.
Ack.
Quoted 2 lines
-- Sebastian
Ricardo
PATCH RESEND v2 2/2 power: supply: bq25980: Implements POWER_SUPPLY_CHARGE_TYPE_BYPASS
In reply to Ricardo Rivera-MatosThis patch remaps the bypass operation from POWER_SUPPLY_CHARGE_TYPE_FAST to POWER_SUPPLY_CHARGE_TYPE_BYPASS.
--- drivers/power/supply/bq25980_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/bq25980_charger.c +1 -1
@@ -764,7 +764,7 @@ static int bq25980_get_charger_property(struct power_supply *psy,if (!state.ce) val->intval =POWER_SUPPLY_CHARGE_TYPE_NONE ;else if (state.bypass) - val->intval =POWER_SUPPLY_CHARGE_TYPE_FAST ; + val->intval =POWER_SUPPLY_CHARGE_TYPE_BYPASS ;else if (!state.bypass) val->intval =POWER_SUPPLY_CHARGE_TYPE_STANDARD ;break ;
Signature · 1 line
2.25.1