power: pm8921-bms: fix reporting  bms_end_cc_uah = 0

There is a bug in the driver where the code to fake full battery
causes coulumb counter based charge (bms_end_cc_uah) to be
reported 0mAh. The reason is once the battery is fully charged a 100% OCV
(open circuit voltage) is faked and columb counter value is offset
such that the coulumb reads start from zero. This faking is cleaned up
until a real OCV happens.

Fix the code such that bms_end_cc_uah is updated before the columb counter
is made to read 0.

Change-Id: I14ce494182ac899205fa41ad815a030d573ab793
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed