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

Commit a67a1c7e authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

power: smb1390: Override ILIM in taper only for CC mode



Do not override ILIM with the max value in CV charging mode as it might
lead to adaptors collapsing. Setting main's ICL to 500 mA is also only
applicable in the case of CC charging mode, so mark that appropriately.

Change-Id: Ifa54094186eb205f3acf3335a54d267573d4d651
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent afd10dc3
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1150,11 +1150,14 @@ static int smb1390_validate_slave_chg_taper(struct smb1390 *chip, int fcc_uA)
		smb1390_dbg(chip, PR_INFO, "Set Master ILIM to MAX, post Slave disable in taper, fcc=%d\n",
									fcc_uA);
		vote_override(chip->ilim_votable, CC_MODE_VOTER,
						true, MAX_ILIM_DUAL_CP_UA);
				smb1390_is_adapter_cc_mode(chip),
				MAX_ILIM_DUAL_CP_UA);

		if (chip->usb_icl_votable)
			vote_override(chip->usb_icl_votable,
				      TAPER_MAIN_ICL_LIMIT_VOTER,
				      true, chip->cc_mode_taper_main_icl_ua);
				      smb1390_is_adapter_cc_mode(chip),
				      chip->cc_mode_taper_main_icl_ua);
	}

	return rc;