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

Skip to content
Commit ee8fec35 authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

hwmon: qpnp-adc-current: fix current compensation direction



Currently the current compensation in the IADC driver is using the wrong
polarity. The compensation function is treating the current with the
battery being the source (i.e. discharging is positive and charging is
negative), but the IADC's IBAT readings treat the battery as a sink
(i.e. charging is positive and discharging is negative).

Fix this by reversing the sign of the iadc current readings before doing
compensation.

Change-Id: I1413ce491b1f430b6a78bfc480174321c512e289
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent 6c584350
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