power: pm8921-bms: use eoc interrupt for writing trim values
The bms driver calibrates the ccadc channel every few minutes for offset and gain. The offset value calibrated needs to be written to the bms hardware which it uses to adjust all the ccadc readings. The software has to only adjust for gain for ccadc based readings. One is not supposed to program the trim offset values in while a bms conversion in progress. Update the code to try only two times instead of 10 to check if the conversion is finished, if not enable the ccadc eoc interrupt and write the values then. Change-Id: I1a1a16feb5ffb927f630850f0f2539ad75805fb1 Signed-off-by:Abhijeet Dharmapurikar <adharmap@codeaurora.org> [sboyd: droped bms driver change] Signed-off-by:
Stephen Boyd <sboyd@codeaurora.org>
Loading
Please register or sign in to comment