Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d1ffb74 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent de82da07
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment