Loading drivers/power/supply/qcom/qpnp-smb2.c +3 −0 Original line number Diff line number Diff line Loading @@ -992,6 +992,9 @@ static int smb2_batt_set_prop(struct power_supply *psy, /* Not in ship mode as long as the device is active */ if (!val->intval) break; if (chg->pl.psy) power_supply_set_property(chg->pl.psy, POWER_SUPPLY_PROP_SET_SHIP_MODE, val); rc = smblib_set_prop_ship_mode(chg, val); break; case POWER_SUPPLY_PROP_RERUN_AICL: Loading drivers/power/supply/qcom/smb138x-charger.c +22 −0 Original line number Diff line number Diff line Loading @@ -312,6 +312,7 @@ static enum power_supply_property smb138x_batt_props[] = { POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_CHARGER_TEMP, POWER_SUPPLY_PROP_CHARGER_TEMP_MAX, POWER_SUPPLY_PROP_SET_SHIP_MODE, }; static int smb138x_batt_get_prop(struct power_supply *psy, Loading Loading @@ -347,6 +348,10 @@ static int smb138x_batt_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_CHARGER_TEMP_MAX: rc = smblib_get_prop_charger_temp_max(chg, val); break; case POWER_SUPPLY_PROP_SET_SHIP_MODE: /* Not in ship mode as long as device is active */ val->intval = 0; break; default: pr_err("batt power supply get prop %d not supported\n", prop); return -EINVAL; Loading Loading @@ -375,6 +380,12 @@ static int smb138x_batt_set_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_CAPACITY: rc = smblib_set_prop_batt_capacity(chg, val); break; case POWER_SUPPLY_PROP_SET_SHIP_MODE: /* Not in ship mode as long as the device is active */ if (!val->intval) break; rc = smblib_set_prop_ship_mode(chg, val); break; default: pr_err("batt power supply set prop %d not supported\n", prop); return -EINVAL; Loading Loading @@ -494,6 +505,7 @@ static enum power_supply_property smb138x_parallel_props[] = { POWER_SUPPLY_PROP_MODEL_NAME, POWER_SUPPLY_PROP_PARALLEL_MODE, POWER_SUPPLY_PROP_CONNECTOR_HEALTH, POWER_SUPPLY_PROP_SET_SHIP_MODE, }; static int smb138x_parallel_get_prop(struct power_supply *psy, Loading Loading @@ -549,6 +561,10 @@ static int smb138x_parallel_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_CONNECTOR_HEALTH: val->intval = smb138x_get_prop_connector_health(chip); break; case POWER_SUPPLY_PROP_SET_SHIP_MODE: /* Not in ship mode as long as device is active */ val->intval = 0; break; default: pr_err("parallel power supply get prop %d not supported\n", prop); Loading Loading @@ -609,6 +625,12 @@ static int smb138x_parallel_set_prop(struct power_supply *psy, rc = smblib_set_charge_param(chg, &chg->param.freq_buck, val->intval); break; case POWER_SUPPLY_PROP_SET_SHIP_MODE: /* Not in ship mode as long as the device is active */ if (!val->intval) break; rc = smblib_set_prop_ship_mode(chg, val); break; default: pr_err("parallel power supply set prop %d not supported\n", prop); Loading Loading
drivers/power/supply/qcom/qpnp-smb2.c +3 −0 Original line number Diff line number Diff line Loading @@ -992,6 +992,9 @@ static int smb2_batt_set_prop(struct power_supply *psy, /* Not in ship mode as long as the device is active */ if (!val->intval) break; if (chg->pl.psy) power_supply_set_property(chg->pl.psy, POWER_SUPPLY_PROP_SET_SHIP_MODE, val); rc = smblib_set_prop_ship_mode(chg, val); break; case POWER_SUPPLY_PROP_RERUN_AICL: Loading
drivers/power/supply/qcom/smb138x-charger.c +22 −0 Original line number Diff line number Diff line Loading @@ -312,6 +312,7 @@ static enum power_supply_property smb138x_batt_props[] = { POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_CHARGER_TEMP, POWER_SUPPLY_PROP_CHARGER_TEMP_MAX, POWER_SUPPLY_PROP_SET_SHIP_MODE, }; static int smb138x_batt_get_prop(struct power_supply *psy, Loading Loading @@ -347,6 +348,10 @@ static int smb138x_batt_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_CHARGER_TEMP_MAX: rc = smblib_get_prop_charger_temp_max(chg, val); break; case POWER_SUPPLY_PROP_SET_SHIP_MODE: /* Not in ship mode as long as device is active */ val->intval = 0; break; default: pr_err("batt power supply get prop %d not supported\n", prop); return -EINVAL; Loading Loading @@ -375,6 +380,12 @@ static int smb138x_batt_set_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_CAPACITY: rc = smblib_set_prop_batt_capacity(chg, val); break; case POWER_SUPPLY_PROP_SET_SHIP_MODE: /* Not in ship mode as long as the device is active */ if (!val->intval) break; rc = smblib_set_prop_ship_mode(chg, val); break; default: pr_err("batt power supply set prop %d not supported\n", prop); return -EINVAL; Loading Loading @@ -494,6 +505,7 @@ static enum power_supply_property smb138x_parallel_props[] = { POWER_SUPPLY_PROP_MODEL_NAME, POWER_SUPPLY_PROP_PARALLEL_MODE, POWER_SUPPLY_PROP_CONNECTOR_HEALTH, POWER_SUPPLY_PROP_SET_SHIP_MODE, }; static int smb138x_parallel_get_prop(struct power_supply *psy, Loading Loading @@ -549,6 +561,10 @@ static int smb138x_parallel_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_CONNECTOR_HEALTH: val->intval = smb138x_get_prop_connector_health(chip); break; case POWER_SUPPLY_PROP_SET_SHIP_MODE: /* Not in ship mode as long as device is active */ val->intval = 0; break; default: pr_err("parallel power supply get prop %d not supported\n", prop); Loading Loading @@ -609,6 +625,12 @@ static int smb138x_parallel_set_prop(struct power_supply *psy, rc = smblib_set_charge_param(chg, &chg->param.freq_buck, val->intval); break; case POWER_SUPPLY_PROP_SET_SHIP_MODE: /* Not in ship mode as long as the device is active */ if (!val->intval) break; rc = smblib_set_prop_ship_mode(chg, val); break; default: pr_err("parallel power supply set prop %d not supported\n", prop); Loading