Lines Matching refs:adc_info
106 struct palmas_gpadc_info *adc_info; member
296 int x1 = adc->adc_info[adc_chan].x1; in palmas_gpadc_calibrate()
297 int x2 = adc->adc_info[adc_chan].x2; in palmas_gpadc_calibrate()
298 int v1 = adc->adc_info[adc_chan].v1; in palmas_gpadc_calibrate()
299 int v2 = adc->adc_info[adc_chan].v2; in palmas_gpadc_calibrate()
302 adc->adc_info[adc_chan].trim1_reg, &d1); in palmas_gpadc_calibrate()
309 adc->adc_info[adc_chan].trim2_reg, &d2); in palmas_gpadc_calibrate()
321 adc->adc_info[adc_chan].gain_error = k; in palmas_gpadc_calibrate()
322 adc->adc_info[adc_chan].gain = gain; in palmas_gpadc_calibrate()
324 adc->adc_info[adc_chan].offset = (d1 * 1000) - ((k - 1000) * x1); in palmas_gpadc_calibrate()
367 if (!adc->adc_info[adc_chan].is_uncalibrated) in palmas_gpadc_get_calibrated_code()
368 val = (val*1000 - adc->adc_info[adc_chan].offset) / in palmas_gpadc_get_calibrated_code()
369 adc->adc_info[adc_chan].gain_error; in palmas_gpadc_get_calibrated_code()
376 val = (val * adc->adc_info[adc_chan].gain) / 1000; in palmas_gpadc_get_calibrated_code()
518 adc->adc_info = palmas_gpadc_info; in palmas_gpadc_probe()
608 if (!(adc->adc_info[i].is_uncalibrated)) in palmas_gpadc_probe()