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

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

power: qpnp-smb5: Fix FV configuration when QNOVO is enabled



Currently, for CC mode, user space depends on BATT_PROFILE_VOTER's
vote on FV to select a PDO. When Qnovo is enabled, this vote is removed,
causing failure in selecting a PDO and exiting CC mode with QC4 charger.
Fix this, by making PDO selection independent of BATT_PROFILE_VOTER's
vote when qnovo is enabled.

Change-Id: I95817d3e54e373eefbab5625699665517f461322
Signed-off-by: default avatarSahil Chandna <chandna@codeaurora.org>
parent 576ac265
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1687,6 +1687,9 @@ static int smb5_batt_get_prop(struct power_supply *psy,
				POWER_SUPPLY_PROP_VOLTAGE_NOW, val);
		break;
	case POWER_SUPPLY_PROP_VOLTAGE_MAX:
		val->intval = get_client_vote(chg->fv_votable,
					      QNOVO_VOTER);
		if (val->intval < 0)
			val->intval = get_client_vote(chg->fv_votable,
						      BATT_PROFILE_VOTER);
		break;