Commit acca418a authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: pm8921-bms: add delta param to bms



The master band gap (MBG) drifts when usb is inserted - a known
problem with the hardware. This drifts in the MBG cause errors
in adc readings - in particular the open circuit voltage of the
battery.

Use the driver to measure how much the 0.625V channel drifts when
a usb is inserted and compensate adc readings using that delta.

Also changed the unsigned nature of the calculations done for
adjusting the battery voltage, it was found doing incorrect
adjustments at very low battery voltages.

Change-Id: I15ea0e8ec0cf7ddd679fda1a7fc864f1ba1b46c2
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent c9857ca3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment