power: qpnp-bms: always limit soc to [0, 100]

Currently, soc is only limited to [0, 100] when adjust_soc runs.
However, there are some cases where the main algorithm of adjust_soc is
skipped, due to charging, SOC being too high or in the flat region of
the PC/OCV curve.

This can cause issues where SOC is calculated to be over 100 or under
0, which is undesirable. Fix this by moving the bound_soc call to the
main calculate_soc function so that it is never skipped.

CRs-Fixed: 697713
Change-Id: I641f513d182c62731a4fc115f29c0e38e5ec4c14
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed