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

Commit afd89705 authored by Sahil Chandna's avatar Sahil Chandna
Browse files

power: smb5: Restore full FCC to main once CP is disabled



Remove WLS_PL_CHARGING_VOTER's vote after both charge pumps get turned
off so that the main charger is configured to full FCC, to support
charging.

Change-Id: I46c3ba8a6697024a4561825f211712201f123a80
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: default avatarSahil Chandna <chandna@codeaurora.org>
parent c4f993f9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1374,7 +1374,13 @@ static int smb5_usb_main_set_prop(struct power_supply *psy,
				(val->intval < 0) ? false : true, val->intval);
		if (val->intval >= 0)
			chg->chg_param.forced_main_fcc = val->intval;

		/*
		 * Remove low vote on FCC_MAIN, for WLS, to allow FCC_MAIN to
		 * rise to its full value.
		 */
		if (val->intval < 0)
			vote(chg->fcc_main_votable, WLS_PL_CHARGING_VOTER,
								false, 0);
		/* Main FCC updated re-calculate FCC */
		rerun_election(chg->fcc_votable);
		break;