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

Commit 1957015d authored by Xiaozhe Shi's avatar Xiaozhe Shi Committed by Abhijeet Dharmapurikar
Browse files

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: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent e6e4152a
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