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

Commit e33caaed authored by Ashay Jaiswal's avatar Ashay Jaiswal
Browse files

power: smb1390: keep slave 1390 disable for HVDCP3 adapters



Single SMB1390 adapter is sufficient to handle power rating
of HVDCP3 adapters, thus keep slave SMB1390 disabled.

Change-Id: I7ca88c69d5baaa506202130becd505e3ef20854c
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent 0c8f37a3
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -1096,6 +1096,12 @@ static void smb1390_status_change_work(struct work_struct *work)
			goto out;
			goto out;
		}
		}


		/*
		 * Slave SMB1390 is not required for the power-rating of QC3
		 */
		if (pval.intval != POWER_SUPPLY_CP_HVDCP3)
			vote(chip->slave_disable_votable, SRC_VOTER, false, 0);

		/* Check for SOC threshold only once before enabling CP */
		/* Check for SOC threshold only once before enabling CP */
		vote(chip->disable_votable, SRC_VOTER, false, 0);
		vote(chip->disable_votable, SRC_VOTER, false, 0);
		if (!chip->batt_soc_validated) {
		if (!chip->batt_soc_validated) {
@@ -1163,6 +1169,7 @@ static void smb1390_status_change_work(struct work_struct *work)
		}
		}
	} else {
	} else {
		chip->batt_soc_validated = false;
		chip->batt_soc_validated = false;
		vote(chip->slave_disable_votable, SRC_VOTER, true, 0);
		vote(chip->disable_votable, SRC_VOTER, true, 0);
		vote(chip->disable_votable, SRC_VOTER, true, 0);
		vote(chip->disable_votable, TAPER_END_VOTER, false, 0);
		vote(chip->disable_votable, TAPER_END_VOTER, false, 0);
		vote(chip->fcc_votable, CP_VOTER, false, 0);
		vote(chip->fcc_votable, CP_VOTER, false, 0);
@@ -1578,6 +1585,8 @@ static int smb1390_create_votables(struct smb1390 *chip)
	if (IS_ERR(chip->slave_disable_votable))
	if (IS_ERR(chip->slave_disable_votable))
		return PTR_ERR(chip->slave_disable_votable);
		return PTR_ERR(chip->slave_disable_votable);


	/* Keep slave SMB disabled */
	vote(chip->slave_disable_votable, SRC_VOTER, true, 0);
	/*
	/*
	 * charge pump is initially disabled; this indirectly votes to allow
	 * charge pump is initially disabled; this indirectly votes to allow
	 * traditional parallel charging if present
	 * traditional parallel charging if present