power: qpnp-bms: use minimum iavg upon boot if nothing is stored

Previously, the BMS driver takes fresh average curernt samples upon boot
if there is no shutdown SoC stored. However, this creates a lot of
problems when booting up at low SoCs because the IAVG is huge upon boot.
This creates an issue where UUC is pulled very high and SoC is pulled
very low.

Fix this by always using the minimal iavg if nothing is stored at
shutdown.

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