Loading drivers/power/qpnp-smbcharger.c +16 −1 Original line number Diff line number Diff line Loading @@ -1716,7 +1716,7 @@ static void smbchg_parallel_usb_enable(struct smbchg_chip *chip) struct power_supply *parallel_psy = get_parallel_psy(chip); union power_supply_propval pval = {0, }; int current_limit_ma, parallel_cl_ma, total_current_ma; int new_parallel_cl_ma, min_current_thr_ma; int new_parallel_cl_ma, min_current_thr_ma, rc; if (!parallel_psy) return; Loading Loading @@ -1781,6 +1781,12 @@ static void smbchg_parallel_usb_enable(struct smbchg_chip *chip) taper_irq_en(chip, true); chip->parallel.current_max_ma = new_parallel_cl_ma; rc = power_supply_set_voltage_limit(parallel_psy, chip->vfloat_mv + 50); if (rc) { dev_err(chip->dev, "Couldn't set float voltage on parallel psy rc: %d\n", rc); goto disable_parallel; } power_supply_set_present(parallel_psy, true); smbchg_set_fastchg_current(chip, chip->target_fastchg_current_ma / 2); pval.intval = chip->target_fastchg_current_ma * 1000 / 2; Loading Loading @@ -2340,6 +2346,7 @@ static int smbchg_float_voltage_comp_set(struct smbchg_chip *chip, int code) #define VHIGH_RANGE_FLOAT_STEP_MV 20 static int smbchg_float_voltage_set(struct smbchg_chip *chip, int vfloat_mv) { struct power_supply *parallel_psy = get_parallel_psy(chip); int rc, delta; u8 temp; Loading Loading @@ -2369,6 +2376,14 @@ static int smbchg_float_voltage_set(struct smbchg_chip *chip, int vfloat_mv) vfloat_mv -= delta % VHIGH_RANGE_FLOAT_STEP_MV; } if (parallel_psy) { rc = power_supply_set_voltage_limit(parallel_psy, vfloat_mv + 50); if (rc) dev_err(chip->dev, "Couldn't set float voltage on parallel psy rc: %d\n", rc); } rc = smbchg_sec_masked_write(chip, chip->chgr_base + VFLOAT_CFG_REG, VFLOAT_MASK, temp); Loading Loading
drivers/power/qpnp-smbcharger.c +16 −1 Original line number Diff line number Diff line Loading @@ -1716,7 +1716,7 @@ static void smbchg_parallel_usb_enable(struct smbchg_chip *chip) struct power_supply *parallel_psy = get_parallel_psy(chip); union power_supply_propval pval = {0, }; int current_limit_ma, parallel_cl_ma, total_current_ma; int new_parallel_cl_ma, min_current_thr_ma; int new_parallel_cl_ma, min_current_thr_ma, rc; if (!parallel_psy) return; Loading Loading @@ -1781,6 +1781,12 @@ static void smbchg_parallel_usb_enable(struct smbchg_chip *chip) taper_irq_en(chip, true); chip->parallel.current_max_ma = new_parallel_cl_ma; rc = power_supply_set_voltage_limit(parallel_psy, chip->vfloat_mv + 50); if (rc) { dev_err(chip->dev, "Couldn't set float voltage on parallel psy rc: %d\n", rc); goto disable_parallel; } power_supply_set_present(parallel_psy, true); smbchg_set_fastchg_current(chip, chip->target_fastchg_current_ma / 2); pval.intval = chip->target_fastchg_current_ma * 1000 / 2; Loading Loading @@ -2340,6 +2346,7 @@ static int smbchg_float_voltage_comp_set(struct smbchg_chip *chip, int code) #define VHIGH_RANGE_FLOAT_STEP_MV 20 static int smbchg_float_voltage_set(struct smbchg_chip *chip, int vfloat_mv) { struct power_supply *parallel_psy = get_parallel_psy(chip); int rc, delta; u8 temp; Loading Loading @@ -2369,6 +2376,14 @@ static int smbchg_float_voltage_set(struct smbchg_chip *chip, int vfloat_mv) vfloat_mv -= delta % VHIGH_RANGE_FLOAT_STEP_MV; } if (parallel_psy) { rc = power_supply_set_voltage_limit(parallel_psy, vfloat_mv + 50); if (rc) dev_err(chip->dev, "Couldn't set float voltage on parallel psy rc: %d\n", rc); } rc = smbchg_sec_masked_write(chip, chip->chgr_base + VFLOAT_CFG_REG, VFLOAT_MASK, temp); Loading