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

Commit 62839c2f authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

power: smb5: Remove FCC vote for wls pl charging



FCC_STEPPER_VOTER votes for 1.5 A upon USB removal so that FCC can ramp
up from 1.5 A, which results in faster ramp-up time. Remove that upon DC
plugin so that FCC can rise.

With 'commit 148ea9f3 ("power: smb5: Limit main charger's current
for VBATT wls pl charging")' FCC_MAIN was limited to 1 A. But now the
limiting action is performed by an override vote from userspace. The
FCC_MAIN vote is nevertheless retained for the speed of its response,
which kicks in much before userspace has the chance to cast its vote.

Change-Id: I13cd7ef467b6803633d1001fc702934a20a5e785
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent 773b595b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -6128,8 +6128,9 @@ irqreturn_t dc_plugin_irq_handler(int irq, void *data)

		/*
		 * Remove USB's CP ILIM vote - inapplicable for wireless
		 * parallel charging.
		 * parallel charging. Also undo FCC STEPPER's 1.5 A vote.
		 */
		vote(chg->fcc_votable, FCC_STEPPER_VOTER, false, 0);
		if (chg->cp_ilim_votable)
			vote(chg->cp_ilim_votable, ICL_CHANGE_VOTER, false, 0);

@@ -6182,6 +6183,10 @@ irqreturn_t dc_plugin_irq_handler(int irq, void *data)
		vote(chg->dc_suspend_votable, CHG_TERMINATION_VOTER, false, 0);
		vote(chg->fcc_main_votable, WLS_PL_CHARGING_VOTER, false, 0);

		/* Force 1500mA FCC on WLS removal if fcc stepper is enabled */
		if (chg->fcc_stepper_enable)
			vote(chg->fcc_votable, FCC_STEPPER_VOTER,
							true, 1500000);
		chg->last_wls_vout = 0;
	}