@@ -14,6 +14,9 @@ Description:
Charging begins when level drops below
charge_control_start_threshold, and ceases when
level is above charge_control_end_threshold.
+ Permanent Long Life: Last longer battery life, this mode
+ is programmed once in the factory. Switching to a
+ different mode is unavailable.
What: /sys/class/power_supply/wilco-charger/charge_control_start_threshold
Date: April 2019
@@ -87,6 +87,7 @@ static const char * const POWER_SUPPLY_CHARGE_TYPE_TEXT[] = {
[POWER_SUPPLY_CHARGE_TYPE_STANDARD] = "Standard",
[POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE] = "Adaptive",
[POWER_SUPPLY_CHARGE_TYPE_CUSTOM] = "Custom",
+ [POWER_SUPPLY_CHARGE_TYPE_LONGLIFE] = "Permanent Long Life",
};
static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
@@ -27,6 +27,7 @@ enum charge_mode {
CHARGE_MODE_AC = 3, /* Mostly AC use, used for Trickle */
CHARGE_MODE_AUTO = 4, /* Used for Adaptive */
CHARGE_MODE_CUSTOM = 5, /* Used for Custom */
+ CHARGE_MODE_LONGLIFE = 6, /* Used for Permanent Long Life */
};
#define CHARGE_LOWER_LIMIT_MIN 50
@@ -48,6 +49,8 @@ static int psp_val_to_charge_mode(int psp_val)
return CHARGE_MODE_AUTO;
case POWER_SUPPLY_CHARGE_TYPE_CUSTOM:
return CHARGE_MODE_CUSTOM;
+ case POWER_SUPPLY_CHARGE_TYPE_LONGLIFE:
+ return CHARGE_MODE_LONGLIFE;
default:
return -EINVAL;
}
@@ -67,6 +70,8 @@ static int charge_mode_to_psp_val(enum charge_mode mode)
return POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE;
case CHARGE_MODE_CUSTOM:
return POWER_SUPPLY_CHARGE_TYPE_CUSTOM;
+ case CHARGE_MODE_LONGLIFE:
+ return POWER_SUPPLY_CHARGE_TYPE_LONGLIFE;
default:
return -EINVAL;
}
@@ -48,6 +48,7 @@ enum {
POWER_SUPPLY_CHARGE_TYPE_STANDARD, /* normal speed */
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 */
};
enum {
This is a long life mode for extended warranty battery, switching to a differnt mode selection is unavailable. The power charging rate is customized so that battery at work last longer. Signed-off-by: Crag Wang <crag_wang@dell.com> --- Documentation/ABI/testing/sysfs-class-power-wilco | 3 +++ drivers/power/supply/power_supply_sysfs.c | 1 + drivers/power/supply/wilco-charger.c | 5 +++++ include/linux/power_supply.h | 1 + 4 files changed, 10 insertions(+)