power: pm8921-bms: adjust the coulomb counter as per revision

The value of LSB for coulomb counter readings are different for pmic
revisions 2.0 onwards. Adjust the coulomb counter readings for them.

While at it, replace macros with functions to avail of type checking
the compiler provides.

Also since the calculate_cc_mvh() actually returns the cc value
in milli amp hour, rename that function to calculate_cc_mah()

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