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

Commit 83094d94 authored by Anirudh Ghayal's avatar Anirudh Ghayal
Browse files

power: qpnp-qg: Update a specific SOC scaling condition



Allow the SOC to scale to a higher value in a specific
condition (msoc = 0), even if USB is present and we are
discharging. This typically occurs during boot-up with
charger connected at 0% SOC.

Change-Id: If7dd806e6427b65427d5999bb9ccda7098ec6107
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent 9314c652
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -486,8 +486,9 @@ static bool is_scaling_required(struct qpnp_qg *chip)

	if (chip->catch_up_soc > chip->msoc && input_present &&
			(chip->charge_status != POWER_SUPPLY_STATUS_CHARGING &&
			chip->charge_status != POWER_SUPPLY_STATUS_FULL))
		/* USB is present, but not charging */
			chip->charge_status != POWER_SUPPLY_STATUS_FULL
			&& chip->msoc != 0))
		/* USB is present, but not charging. Ignore when msoc = 0 */
		return false;

	return true;