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

Commit 2f87d72c authored by Harry Yang's avatar Harry Yang
Browse files

power: battery: Fix SMB1355 Parallel Charging disabling issue



PARALLEL_PSY_VOTER is a voter to disable SMB1355 parallel charging only
when parallel psy is not present. However, there are cases in the current
implementation retaining PARALLEL_PSY_VOTER veto even after parallel psy
is detected present.

Fix it.

CRs-Fixed: 2313484
Change-Id: I89242d13ffce52d7090abf8c01357d3938edf751
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent a05a16af
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1263,6 +1263,8 @@ static bool is_parallel_available(struct pl_data *chip)
	if (!chip->pl_psy)
		return false;

	vote(chip->pl_disable_votable, PARALLEL_PSY_VOTER, false, 0);

	rc = power_supply_get_property(chip->pl_psy,
			       POWER_SUPPLY_PROP_PARALLEL_MODE, &pval);
	if (rc < 0) {
@@ -1311,8 +1313,6 @@ static bool is_parallel_available(struct pl_data *chip)
	if (!rc)
		chip->pl_fcc_max = pval.intval;

	vote(chip->pl_disable_votable, PARALLEL_PSY_VOTER, false, 0);

	return true;
}