power: qpnp-fg: fix error in calculating cc_to_soc coefficient
Currently, MAH_TO_SOC_CONV_REG is read and the data is converted
to half float before dividing it by the learned capacity.
However, it should not be converted like that and should be used
as an unsigned integer instead. Also, before dividing it by the
learned capacity, convert it to MICRO_UNIT so that the floating
point encoding of cc_to_soc coefficient will be proper. Fix it.
CRs-Fixed: 887349
Change-Id: Ibbeca6f2aff24fc68bc8bf931fa03850ca22c3a9
Signed-off-by:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment