power: qpnp-bms: Make bms iadc channel select configurable

Make the BMS IADC channel select configurable from the devicetree.
This channel is the one that BMS feeds into the coulomb counter. It can
be either internal rsense (to use RDS of the batfet) or an external
rsense resistor attached.

If we detect a different channel selected than configured on boot,
switch to the configured channel and clear the coulomb counter.

Change-Id: I42b15bdda7dd91068ecf3ae10daa785db668b564
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2 files changed