power: supply: cpcap-battery: Use accumulator for current and power average
authorTony Lindgren <tony@atomide.com>
Sun, 7 Apr 2019 18:12:52 +0000 (11:12 -0700)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 15 Apr 2019 20:53:16 +0000 (22:53 +0200)
commit5fc27a54192687a41df3d7fd70e0648bb1ca391e
tree2a2b183ce8bb64ad938f1c440cb90d104bd26e47
parent35439b7ab2dbd458377efaa979820360f4951784
power: supply: cpcap-battery: Use accumulator for current and power average

We should not use measured current value for average since we have proper
coulomb counter values available. Using measured current value should
be only used when the value is queried at a higher rate than the 250 ms
rate the coulomb counter is configured to run at.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-battery.c