Lines Matching refs:cal_data
251 struct ab8500_adc_cal_data cal_data[AB8500_CAL_NR]; member
286 if (!gpadc->cal_data[AB8500_CAL_VMAIN].gain) { in ab8500_gpadc_ad_to_voltage()
293 res = (int) (ad_value * gpadc->cal_data[AB8500_CAL_VMAIN].gain + in ab8500_gpadc_ad_to_voltage()
294 gpadc->cal_data[AB8500_CAL_VMAIN].offset) / AB8500_GPADC_CALIB_SCALE; in ab8500_gpadc_ad_to_voltage()
304 if (!gpadc->cal_data[AB8500_CAL_BTEMP].gain) { in ab8500_gpadc_ad_to_voltage()
311 res = (int) (ad_value * gpadc->cal_data[AB8500_CAL_BTEMP].gain + in ab8500_gpadc_ad_to_voltage()
312 gpadc->cal_data[AB8500_CAL_BTEMP].offset) / AB8500_GPADC_CALIB_SCALE; in ab8500_gpadc_ad_to_voltage()
318 if (!gpadc->cal_data[AB8500_CAL_VBAT].gain) { in ab8500_gpadc_ad_to_voltage()
325 res = (int) (ad_value * gpadc->cal_data[AB8500_CAL_VBAT].gain + in ab8500_gpadc_ad_to_voltage()
326 gpadc->cal_data[AB8500_CAL_VBAT].offset) / AB8500_GPADC_CALIB_SCALE; in ab8500_gpadc_ad_to_voltage()
362 if (!gpadc->cal_data[AB8500_CAL_IBAT].gain) { in ab8500_gpadc_ad_to_voltage()
369 res = (int) (ad_value * gpadc->cal_data[AB8500_CAL_IBAT].gain + in ab8500_gpadc_ad_to_voltage()
370 gpadc->cal_data[AB8500_CAL_IBAT].offset) in ab8500_gpadc_ad_to_voltage()
768 gpadc->cal_data[AB8500_CAL_VMAIN].otp_calib_hi = in ab8500_gpadc_read_calibration_data()
770 gpadc->cal_data[AB8500_CAL_VMAIN].otp_calib_lo = in ab8500_gpadc_read_calibration_data()
773 gpadc->cal_data[AB8500_CAL_VMAIN].gain = AB8500_GPADC_CALIB_SCALE * in ab8500_gpadc_read_calibration_data()
775 gpadc->cal_data[AB8500_CAL_VMAIN].offset = AB8500_GPADC_CALIB_SCALE * in ab8500_gpadc_read_calibration_data()
779 gpadc->cal_data[AB8500_CAL_VMAIN].gain = 0; in ab8500_gpadc_read_calibration_data()
800 gpadc->cal_data[AB8500_CAL_IBAT].otp_calib_hi = in ab8500_gpadc_read_calibration_data()
802 gpadc->cal_data[AB8500_CAL_IBAT].otp_calib_lo = in ab8500_gpadc_read_calibration_data()
823 gpadc->cal_data[AB8500_CAL_IBAT].gain = in ab8500_gpadc_read_calibration_data()
825 gpadc->cal_data[AB8500_CAL_IBAT].offset = in ab8500_gpadc_read_calibration_data()
828 gpadc->cal_data[AB8500_CAL_IBAT].gain = 0; in ab8500_gpadc_read_calibration_data()
838 gpadc->cal_data[AB8500_CAL_VMAIN].otp_calib_hi = in ab8500_gpadc_read_calibration_data()
840 gpadc->cal_data[AB8500_CAL_VMAIN].otp_calib_lo = in ab8500_gpadc_read_calibration_data()
843 gpadc->cal_data[AB8500_CAL_VMAIN].gain = AB8500_GPADC_CALIB_SCALE * in ab8500_gpadc_read_calibration_data()
846 gpadc->cal_data[AB8500_CAL_VMAIN].offset = AB8500_GPADC_CALIB_SCALE * in ab8500_gpadc_read_calibration_data()
850 gpadc->cal_data[AB8500_CAL_VMAIN].gain = 0; in ab8500_gpadc_read_calibration_data()
860 gpadc->cal_data[AB8500_CAL_BTEMP].otp_calib_hi = (u16)btemp_high; in ab8500_gpadc_read_calibration_data()
861 gpadc->cal_data[AB8500_CAL_BTEMP].otp_calib_lo = (u16)btemp_low; in ab8500_gpadc_read_calibration_data()
863 gpadc->cal_data[AB8500_CAL_BTEMP].gain = in ab8500_gpadc_read_calibration_data()
865 gpadc->cal_data[AB8500_CAL_BTEMP].offset = AB8500_GPADC_CALIB_SCALE * 1300 - in ab8500_gpadc_read_calibration_data()
869 gpadc->cal_data[AB8500_CAL_BTEMP].gain = 0; in ab8500_gpadc_read_calibration_data()
877 gpadc->cal_data[AB8500_CAL_VBAT].otp_calib_hi = (u16)vbat_high; in ab8500_gpadc_read_calibration_data()
878 gpadc->cal_data[AB8500_CAL_VBAT].otp_calib_lo = (u16)vbat_low; in ab8500_gpadc_read_calibration_data()
880 gpadc->cal_data[AB8500_CAL_VBAT].gain = AB8500_GPADC_CALIB_SCALE * in ab8500_gpadc_read_calibration_data()
882 gpadc->cal_data[AB8500_CAL_VBAT].offset = AB8500_GPADC_CALIB_SCALE * 4700 - in ab8500_gpadc_read_calibration_data()
886 gpadc->cal_data[AB8500_CAL_VBAT].gain = 0; in ab8500_gpadc_read_calibration_data()