Lines Matching full:scale

112 	int (*get_ratio)(int channel, int scale);
126 * should use the small-scale graph, and if more than 1.2v, we should use the
127 * big-scale graph.
220 static int sc2720_adc_get_ratio(int channel, int scale) in sc2720_adc_get_ratio() argument
224 switch (scale) { in sc2720_adc_get_ratio()
237 switch (scale) { in sc2720_adc_get_ratio()
252 switch (scale) { in sc2720_adc_get_ratio()
265 switch (scale) { in sc2720_adc_get_ratio()
281 static int sc2721_adc_get_ratio(int channel, int scale) in sc2721_adc_get_ratio() argument
288 return scale ? SC27XX_VOLT_RATIO(400, 1025) : in sc2721_adc_get_ratio()
294 return scale ? SC27XX_VOLT_RATIO(100, 125) : in sc2721_adc_get_ratio()
308 static int sc2730_adc_get_ratio(int channel, int scale) in sc2730_adc_get_ratio() argument
312 switch (scale) { in sc2730_adc_get_ratio()
325 switch (scale) { in sc2730_adc_get_ratio()
338 switch (scale) { in sc2730_adc_get_ratio()
353 switch (scale) { in sc2730_adc_get_ratio()
366 switch (scale) { in sc2730_adc_get_ratio()
382 static int sc2731_adc_get_ratio(int channel, int scale) in sc2731_adc_get_ratio() argument
389 return scale ? SC27XX_VOLT_RATIO(400, 1025) : in sc2731_adc_get_ratio()
397 return scale ? SC27XX_VOLT_RATIO(100, 125) : in sc2731_adc_get_ratio()
470 * channels 5 uses big scale, others use smale. in sc2731_adc_scale_init()
485 int scale, int *val) in sc27xx_adc_read() argument
521 /* Configure the channel id and scale */ in sc27xx_adc_read()
522 tmp = (scale << data->var_data->scale_shift) & data->var_data->scale_mask; in sc27xx_adc_read()
584 static void sc27xx_adc_volt_ratio(struct sc27xx_adc_data *data, int channel, int scale, in sc27xx_adc_volt_ratio() argument
589 ratio = data->var_data->get_ratio(channel, scale); in sc27xx_adc_volt_ratio()
617 int scale, int raw_adc) in sc27xx_adc_convert_volt() argument
641 sc27xx_adc_volt_ratio(data, channel, scale, &fract); in sc27xx_adc_convert_volt()
647 int channel, int scale, int *val) in sc27xx_adc_read_processed() argument
651 ret = sc27xx_adc_read(data, channel, scale, &raw_adc); in sc27xx_adc_read_processed()
655 *val = sc27xx_adc_convert_volt(data, channel, scale, raw_adc); in sc27xx_adc_read_processed()
664 int scale = data->channel_scale[chan->channel]; in sc27xx_adc_read_raw() local
670 ret = sc27xx_adc_read(data, chan->channel, scale, &tmp); in sc27xx_adc_read_raw()
681 ret = sc27xx_adc_read_processed(data, chan->channel, scale, in sc27xx_adc_read_raw()
692 *val = scale; in sc27xx_adc_read_raw()