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: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This commit is contained in:
parent
8312e8d304
commit
d2af865c75
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue