Loading drivers/power/power_supply_sysfs.c +1 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(pd_active), POWER_SUPPLY_ATTR(charger_temp), POWER_SUPPLY_ATTR(charger_temp_max), POWER_SUPPLY_ATTR(parallel_disable), /* Local extensions of type int64_t */ POWER_SUPPLY_ATTR(charge_counter_ext), /* Properties of type `const char *' */ Loading drivers/power/qcom-charger/qpnp-smb2.c +9 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,7 @@ static enum power_supply_property smb2_usb_props[] = { POWER_SUPPLY_PROP_PD_ACTIVE, POWER_SUPPLY_PROP_INPUT_CURRENT_SETTLED, POWER_SUPPLY_PROP_INPUT_CURRENT_NOW, POWER_SUPPLY_PROP_PARALLEL_DISABLE, }; static int smb2_usb_get_prop(struct power_supply *psy, Loading Loading @@ -404,6 +405,10 @@ static int smb2_usb_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_INPUT_CURRENT_NOW: rc = smblib_get_prop_usb_current_now(chg, val); break; case POWER_SUPPLY_PROP_PARALLEL_DISABLE: val->intval = get_client_vote(chg->pl_disable_votable, USER_VOTER); break; default: pr_err("get prop %d is not supported\n", psp); rc = -EINVAL; Loading Loading @@ -448,6 +453,9 @@ static int smb2_usb_set_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_PD_ACTIVE: rc = smblib_set_prop_pd_active(chg, val); break; case POWER_SUPPLY_PROP_PARALLEL_DISABLE: vote(chg->pl_disable_votable, USER_VOTER, (bool)val->intval, 0); break; default: pr_err("set prop %d is not supported\n", psp); rc = -EINVAL; Loading @@ -462,6 +470,7 @@ static int smb2_usb_prop_is_writeable(struct power_supply *psy, { switch (psp) { case POWER_SUPPLY_PROP_TYPEC_POWER_ROLE: case POWER_SUPPLY_PROP_PARALLEL_DISABLE: return 1; default: break; Loading drivers/power/qcom-charger/smb138x-charger.c +11 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,8 @@ static struct smb_params v1_params = { .name = "fast charge current", .reg = FAST_CHARGE_CURRENT_CFG_REG, .min_u = 0, .max_u = 5000000, .step_u = 50000, .max_u = 4500000, .step_u = 25000, }, .fv = { .name = "float voltage", Loading Loading @@ -1125,6 +1125,15 @@ static int smb138x_slave_probe(struct smb138x *chip) return rc; } /* enable parallel current sensing */ rc = smblib_masked_write(chg, CFG_REG, VCHG_EN_CFG_BIT, VCHG_EN_CFG_BIT); if (rc < 0) { dev_err(chg->dev, "Couldn't enable parallel current sensing rc=%d\n", rc); return rc; } /* keep at the end of probe, ready to serve before notifying others */ rc = smb138x_init_parallel_psy(chip); if (rc < 0) { Loading include/linux/power_supply.h +1 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_PD_ACTIVE, POWER_SUPPLY_PROP_CHARGER_TEMP, POWER_SUPPLY_PROP_CHARGER_TEMP_MAX, POWER_SUPPLY_PROP_PARALLEL_DISABLE, /* Local extensions of type int64_t */ POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT, /* Properties of type `const char *' */ Loading Loading
drivers/power/power_supply_sysfs.c +1 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(pd_active), POWER_SUPPLY_ATTR(charger_temp), POWER_SUPPLY_ATTR(charger_temp_max), POWER_SUPPLY_ATTR(parallel_disable), /* Local extensions of type int64_t */ POWER_SUPPLY_ATTR(charge_counter_ext), /* Properties of type `const char *' */ Loading
drivers/power/qcom-charger/qpnp-smb2.c +9 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,7 @@ static enum power_supply_property smb2_usb_props[] = { POWER_SUPPLY_PROP_PD_ACTIVE, POWER_SUPPLY_PROP_INPUT_CURRENT_SETTLED, POWER_SUPPLY_PROP_INPUT_CURRENT_NOW, POWER_SUPPLY_PROP_PARALLEL_DISABLE, }; static int smb2_usb_get_prop(struct power_supply *psy, Loading Loading @@ -404,6 +405,10 @@ static int smb2_usb_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_INPUT_CURRENT_NOW: rc = smblib_get_prop_usb_current_now(chg, val); break; case POWER_SUPPLY_PROP_PARALLEL_DISABLE: val->intval = get_client_vote(chg->pl_disable_votable, USER_VOTER); break; default: pr_err("get prop %d is not supported\n", psp); rc = -EINVAL; Loading Loading @@ -448,6 +453,9 @@ static int smb2_usb_set_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_PD_ACTIVE: rc = smblib_set_prop_pd_active(chg, val); break; case POWER_SUPPLY_PROP_PARALLEL_DISABLE: vote(chg->pl_disable_votable, USER_VOTER, (bool)val->intval, 0); break; default: pr_err("set prop %d is not supported\n", psp); rc = -EINVAL; Loading @@ -462,6 +470,7 @@ static int smb2_usb_prop_is_writeable(struct power_supply *psy, { switch (psp) { case POWER_SUPPLY_PROP_TYPEC_POWER_ROLE: case POWER_SUPPLY_PROP_PARALLEL_DISABLE: return 1; default: break; Loading
drivers/power/qcom-charger/smb138x-charger.c +11 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,8 @@ static struct smb_params v1_params = { .name = "fast charge current", .reg = FAST_CHARGE_CURRENT_CFG_REG, .min_u = 0, .max_u = 5000000, .step_u = 50000, .max_u = 4500000, .step_u = 25000, }, .fv = { .name = "float voltage", Loading Loading @@ -1125,6 +1125,15 @@ static int smb138x_slave_probe(struct smb138x *chip) return rc; } /* enable parallel current sensing */ rc = smblib_masked_write(chg, CFG_REG, VCHG_EN_CFG_BIT, VCHG_EN_CFG_BIT); if (rc < 0) { dev_err(chg->dev, "Couldn't enable parallel current sensing rc=%d\n", rc); return rc; } /* keep at the end of probe, ready to serve before notifying others */ rc = smb138x_init_parallel_psy(chip); if (rc < 0) { Loading
include/linux/power_supply.h +1 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_PD_ACTIVE, POWER_SUPPLY_PROP_CHARGER_TEMP, POWER_SUPPLY_PROP_CHARGER_TEMP_MAX, POWER_SUPPLY_PROP_PARALLEL_DISABLE, /* Local extensions of type int64_t */ POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT, /* Properties of type `const char *' */ Loading