power: qpnp-smbcharger: reschedule vfloat work upon failure
Currently in the vfloat adjustment workqueue, if a bad sample is read,
the vfloat adjustment work simply tries to poll the fuel gauge again
immediately. This can cause an issue where the SRAM is not updated if
the mem access is already held and the update_now flag is set too
many times in succession.
Also, even if the update_now does release mem access, it should not be
used continuously in rapid succession. Saturating the fuel gauge cycle
with SRAM accesses stretches the fuel gauge cycle. This can cause
problems in fuel gauge accuracy.
Fix these issues by rescheduling the vfloat adjustment work 10 seconds
later whenever a bad sample is read, instead of redoing the fuel gauge
read immediately.
CRs-Fixed: 816594
Change-Id: I765dbbd93e6385ff31ebb32eb937591c7a3b0dfb
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment