Skip to content

Commit

Permalink
power: max17048: Fix reported battery current
Browse files Browse the repository at this point in the history
Not sure why LGE reversed the positive number,
however this is now correct as a negative current
means it's discharging. Check:

/sys/devices/f9923000.i2c/i2c-84/84-0036/power_supply/battery/current_now

Change-Id: I732ee454be8e173a01350314d3a5f8d270c0645b
  • Loading branch information
fluxi authored and airend committed Jan 22, 2017
1 parent 0a77baf commit 87857d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/max17048_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ static int qpnp_get_battery_current(int *current_ua)
return ret;
}

*current_ua = -i_result.result_ua;
*current_ua = i_result.result_ua;

return 0;
}
Expand Down

0 comments on commit 87857d8

Please sign in to comment.