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

Skip to content
Commit e1f383c3 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power: qpnp-fg-gen4: Fix enabling parallel current measurement



'Commit 1b7e5a86
("power: qpnp-fg-gen4: Enable parallel charging current measurement")'
modified BATT_INFO_FG_CNV_CHAR_CFG to enable parallel charging
current measurement which is essential for calculating state of
charge (SOC) accurately. However, if SMB_MEASURE_EN_BIT is set
when FG HW is in the middle of ADC conversions, it can cause ADC
to get locked up without an end of conversion (EOC). Hence that
change got reverted.

Re-enable parallel current measurement as follows.

- Configure PEEK_MUX to output ALG active signal on MEM_ATTN interrupt
- Wait for MEM_ATTN interrupt
- Modify SMB_MEASURE_EN_BIT in BATT_INFO_FG_CNV_CHAR_CFG

Also, configure SMB_MEASURE_EN_BIT dynamically so that parallel
current summing gets enabled upon charger insertion and disabled
upon charger removal or charge termination.

Change-Id: I81289127eeda0af66e11da3290d1b596301becda
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 83373dd1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment