Lines Matching refs:graph
125 * through 2 points in the linear graph. If the voltage is less than 1.2v, we
126 * should use the small-scale graph, and if more than 1.2v, we should use the
127 * big-scale graph.
196 struct sc27xx_adc_linear_graph *graph;
202 graph = &big_scale_graph;
206 graph = &small_scale_graph;
212 /* Only need to calibrate the adc values in the linear graph. */
213 graph->adc0 = sc27xx_adc_get_calib_data(calib_data, calib_graph->adc0);
214 graph->adc1 = sc27xx_adc_get_calib_data(calib_data >> 8,
594 static int adc_to_volt(struct sc27xx_adc_linear_graph *graph,
599 tmp = (graph->volt0 - graph->volt1) * (raw_adc - graph->adc1);
600 tmp /= (graph->adc0 - graph->adc1);
601 tmp += graph->volt1;
606 static int sc27xx_adc_to_volt(struct sc27xx_adc_linear_graph *graph,
611 tmp = adc_to_volt(graph, raw_adc);
623 * Convert ADC values to voltage values according to the linear graph,
625 * return the voltage values calculated by the linear graph. But other