power: pm8921-bms: Fix SOC fluctuations at 100%

It is observed that the SOC can oscillate between 100-99-100
based on OCV updates after EOC (it is possible that there are
multiple varying OCV updates as the battery settles down).
Prevent this by avoiding the SOC to increase if it has dropped
and not charging.

While handling this scenario make sure that we do not scale
when soc = 100 and charging.

CRs-Fixed: 505132
Change-Id: Ie20c02d6df9407717c31e958b6b6f3e736325660
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
1 file changed