power: qpnp-bms: increase resolution of temperature lookups

Currently, the BMS driver rounds to the nearest degree when doing
table lookups on FCC, rbatt, and OCV. This is done with no
interpolation.

This can be harmful because in low temperatures, a change in 1/10th of a
degree C can cause very big swings in UUC due to the rbatt lookup
crossing a threshold. There has been cases seen in -20 degC testing
where when SoC goes from -3.9C to -4C, a shift of 80 mOhms of rbatt was
observed. This increased the UUC by 8% and caused large SoC swings.

Fix this by interpolating between the temperature ranges more smoothly.

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