power: pm8921-bms: use rtc to get average current

The wall time does keep track of time when the device
is suspended. This causes the average current values to be high.

Use rtc clock instead of the monotonic clock api. Since the rtc
clock has only one second resolution the driver rejects calculating
average current if it is invoked in less than 15 seconds. In such
cases it uses the previously calculated average current.

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