Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8c0829e authored by Umang Agrawal's avatar Umang Agrawal Committed by Guru Das Srinagesh
Browse files

power: step-chg: Fix VBAT based step chg flow



Currently, for VBAT based step charging, the uni-directional
forward flow of step charging algorithm works only in case of
tapered step charging mode. Extend the uni-directional flow
configuration to non-tapered step charging mode also.

Change-Id: I18267205abc643dddc735f071c5b368dbb0bca1a
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent c5fc5d4a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -591,10 +591,12 @@ static int handle_step_chg_config(struct step_chg_info *chip)
	if (!chip->fcc_votable)
		return -EINVAL;

	if (chip->taper_fcc)
	if (chip->taper_fcc) {
		taper_fcc_step_chg(chip, chip->step_index, pval.intval);
	else
	} else {
		fcc_ua = chip->step_chg_config->fcc_cfg[chip->step_index].value;
		vote(chip->fcc_votable, STEP_CHG_VOTER, true, fcc_ua);
	}

	pr_debug("%s = %d Step-FCC = %duA taper-fcc: %d\n",
		chip->step_chg_config->param.prop_name, pval.intval,