power: qpnp-bms: fix voltage based soc reporting issues

When voltage based soc is enabled, we did not call power_supply_changed
every time the SOC changed. This caused the UI to not update.

Fix this by moving the voltage based soc calculation into the same
workqueue task that updates SoC.

This may break Coulomb counter-based SoC if enabled post-boot, so remove
the module param for voltage-based SoC and make it only configurable at
boot time.

Change-Id: Ieb4a84bb6f0eaca0b0b4489ac923891fad63dd03
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed