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

Commit bec6f94b authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

power: qpnp-smbcharger: lower fcc by 200mA during SW ESR pulse



Currently the charger driver configures the fast charge current to 300mA
during a software ESR pulse. This is incorrect. FCC should be lowered by
a total delta of 200mA, not to 300mA.

Fix this in the charger driver.

CRs-Fixed: 872937
Change-Id: If7e8a52775d323f0b21d754a4322b85119b15ccc
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent 5b4503d3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1845,6 +1845,7 @@ static int smbchg_set_fastchg_current_raw(struct smbchg_chip *chip,
	return rc;
}

#define ESR_PULSE_CURRENT_DELTA_MA	200
static int smbchg_set_fastchg_current(struct smbchg_chip *chip,
							int current_ma)
{
@@ -1852,7 +1853,7 @@ static int smbchg_set_fastchg_current(struct smbchg_chip *chip,

	mutex_lock(&chip->fcc_lock);
	if (chip->sw_esr_pulse_en)
		current_ma = 300;
		current_ma -= ESR_PULSE_CURRENT_DELTA_MA;
	/* If the requested FCC is same, do not configure it again */
	if (current_ma == chip->fastchg_current_ma) {
		pr_smb(PR_STATUS, "not configuring FCC current: %d FCC: %d\n",