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

Commit 401a1d31 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power: qpnp-fg-gen3: Disable ESR pulldown for debug battery id



Even with proper ESR pulse qualification threshold and ESR pulse
amplitude, ESR pulses are still seen occasionally on devices
that use battery with debug battery id. Disable ESR pulldown when
debug battery id is found. This helps saving power by stopping
ESR pulses.

Change-Id: I2b9588ec39a2268123d94c06517b0dbb43d66fc7
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 56c0a94b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3366,6 +3366,16 @@ static int fg_hw_init(struct fg_chip *chip)
		return rc;
	}

	if (is_debug_batt_id(chip)) {
		val = ESR_NO_PULL_DOWN;
		rc = fg_masked_write(chip, BATT_INFO_ESR_PULL_DN_CFG(chip),
			ESR_PULL_DOWN_MODE_MASK, val);
		if (rc < 0) {
			pr_err("Error in writing esr_pull_down, rc=%d\n", rc);
			return rc;
		}
	}

	return 0;
}