Lines Matching full:graph
92 * through 2 points in the linear graph. If the voltage is less than 1.2v, we
93 * should use the small-scale graph, and if more than 1.2v, we should use the
94 * big-scale graph.
125 struct sc27xx_adc_linear_graph *graph; in sc27xx_adc_scale_calibration() local
134 graph = &big_scale_graph; in sc27xx_adc_scale_calibration()
138 graph = &small_scale_graph; in sc27xx_adc_scale_calibration()
154 /* Only need to calibrate the adc values in the linear graph. */ in sc27xx_adc_scale_calibration()
155 graph->adc0 = sc27xx_adc_get_calib_data(calib_data, calib_graph->adc0); in sc27xx_adc_scale_calibration()
156 graph->adc1 = sc27xx_adc_get_calib_data(calib_data >> 8, in sc27xx_adc_scale_calibration()
271 static int sc27xx_adc_to_volt(struct sc27xx_adc_linear_graph *graph, in sc27xx_adc_to_volt() argument
276 tmp = (graph->volt0 - graph->volt1) * (raw_adc - graph->adc1); in sc27xx_adc_to_volt()
277 tmp /= (graph->adc0 - graph->adc1); in sc27xx_adc_to_volt()
278 tmp += graph->volt1; in sc27xx_adc_to_volt()
290 * Convert ADC values to voltage values according to the linear graph, in sc27xx_adc_convert_volt()
292 * return the voltage values calculated by the linear graph. But other in sc27xx_adc_convert_volt()