Lines Matching refs:adc_info
112 struct palmas_gpadc_info *adc_info; member
303 int x1 = adc->adc_info[adc_chan].x1; in palmas_gpadc_calibrate()
304 int x2 = adc->adc_info[adc_chan].x2; in palmas_gpadc_calibrate()
305 int v1 = adc->adc_info[adc_chan].v1; in palmas_gpadc_calibrate()
306 int v2 = adc->adc_info[adc_chan].v2; in palmas_gpadc_calibrate()
309 adc->adc_info[adc_chan].trim1_reg, &d1); in palmas_gpadc_calibrate()
316 adc->adc_info[adc_chan].trim2_reg, &d2); in palmas_gpadc_calibrate()
328 adc->adc_info[adc_chan].gain_error = k; in palmas_gpadc_calibrate()
329 adc->adc_info[adc_chan].gain = gain; in palmas_gpadc_calibrate()
331 adc->adc_info[adc_chan].offset = (d1 * 1000) - ((k - 1000) * x1); in palmas_gpadc_calibrate()
374 if (!adc->adc_info[adc_chan].is_uncalibrated) in palmas_gpadc_get_calibrated_code()
375 val = (val*1000 - adc->adc_info[adc_chan].offset) / in palmas_gpadc_get_calibrated_code()
376 adc->adc_info[adc_chan].gain_error; in palmas_gpadc_get_calibrated_code()
384 val = (val * adc->adc_info[adc_chan].gain) / 1000; in palmas_gpadc_get_calibrated_code()
526 adc->adc_info = palmas_gpadc_info; in palmas_gpadc_probe()
619 if (!(adc->adc_info[i].is_uncalibrated)) in palmas_gpadc_probe()