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

Commit 130f2f3c authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power: qpnp-fg-gen4: Use ESR_ACT for available power calculation



As per the hardware recommendation, use ESR_ACT to calculate the
available power instead of ESR for better accuracy.

Change-Id: Ie21b3522a0aeb5047959457b0fbf1f9c8b185f29
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 7d280eee
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -919,9 +919,9 @@ static int fg_gen4_get_power(struct fg_gen4_chip *chip, int *val, bool average)
	v_min = chip->dt.sys_min_volt_mv * 1000;
	power = (s64)v_min * (v_pred - v_min);

	rc = fg_get_sram_prop(fg, FG_SRAM_ESR, &esr_uohms);
	rc = fg_get_sram_prop(fg, FG_SRAM_ESR_ACT, &esr_uohms);
	if (rc < 0) {
		pr_err("failed to get ESR, rc=%d\n", rc);
		pr_err("failed to get ESR_ACT, rc=%d\n", rc);
		return rc;
	}