mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
power: qpnp-smbcharger-mmi: Wait for FG Ready
IF the Max FG report -EAGAIN then it has not completed the init of the battery profile and values could be inaccurate. So stop processing and reschedule heartbeat if this is seen so a fresh 1st run of data can be taken. Change-Id: I2070ba9e90338b7eb2ba8eb4f395739170810012 Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com> Reviewed-on: https://gerrit.mot.com/1376495 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com> Reviewed-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-by: Kenneth Kessler <kennykessler@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
27e6137294
commit
fefaa0821c
1 changed files with 6 additions and 0 deletions
|
|
@ -2706,6 +2706,12 @@ static void mmi_heartbeat_work(struct work_struct *work)
|
|||
} else
|
||||
flip_cap_full = pval.intval;
|
||||
|
||||
if (cap_err == -EAGAIN) {
|
||||
mmi_err(chip, "SMBMMI: The FGs are not ready yet\n");
|
||||
hb_resch_time = HEARTBEAT_DUAL_DELAY_MS;
|
||||
goto sch_hb;
|
||||
}
|
||||
|
||||
report_cap = main_cap * main_cap_full;
|
||||
report_cap += flip_cap * flip_cap_full;
|
||||
report_cap /= main_cap_full + flip_cap_full;
|
||||
|
|
|
|||
Loading…
Reference in a new issue