power: qpnp-bms: use consistent IAVG for raw SOC calculation

Currently the BMS uses the instantaneous current for the raw SOC
calculation. However, this current can be very high because of the boot
tiime power draw. This can bias the UUC to unreasonably levels (100% of
the battery when at cold temperatures) and cause the saved shutdown SOC
to be needlessly discarded.

Use the more realistic IAVG of 250 mA when doing this initial raw SOC
calculation as well in other places where iavg is being reset to avoid
skewing the results. Also, do not save the percent UUC when doing the raw
SOC calculation. Rather, use the loaded shutdown IAVG if there is one.

Change-Id: I426b824a50568b01bae442a3154e7c68c42409f8
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed