Home
last modified time | relevance | path

Searched refs:scale_uv (Results 1 – 9 of 9) sorted by relevance

/drivers/iio/adc/
Dad7766.c132 int scale_uv; in ad7766_read_raw() local
136 scale_uv = regulator_get_voltage(vref); in ad7766_read_raw()
137 if (scale_uv < 0) in ad7766_read_raw()
138 return scale_uv; in ad7766_read_raw()
139 *val = scale_uv / 1000; in ad7766_read_raw()
Dad7476.c137 int scale_uv; in ad7476_read_raw() local
154 scale_uv = regulator_get_voltage(st->ref_reg); in ad7476_read_raw()
155 if (scale_uv < 0) in ad7476_read_raw()
156 return scale_uv; in ad7476_read_raw()
158 scale_uv = st->chip_info->int_vref_uv; in ad7476_read_raw()
160 *val = scale_uv / 1000; in ad7476_read_raw()
Dad7793.c261 unsigned long long scale_uv; in ad7793_setup() local
331 scale_uv = ((u64)vref_mv * 100000000) in ad7793_setup()
334 scale_uv >>= i; in ad7793_setup()
336 st->scale_avail[i][1] = do_div(scale_uv, 100000000) * 10; in ad7793_setup()
337 st->scale_avail[i][0] = scale_uv; in ad7793_setup()
404 unsigned long long scale_uv; in ad7793_read_raw() local
426 scale_uv = (1170ULL * 1000000000ULL * 6ULL); in ad7793_read_raw()
430 scale_uv = 1444444444444444ULL; in ad7793_read_raw()
436 scale_uv >>= (chan->scan_type.realbits - (unipolar ? 0 : 1)); in ad7793_read_raw()
438 *val2 = scale_uv; in ad7793_read_raw()
Dad7768-1.c364 int scale_uv, ret; in ad7768_read_raw() local
383 scale_uv = regulator_get_voltage(st->vref); in ad7768_read_raw()
384 if (scale_uv < 0) in ad7768_read_raw()
385 return scale_uv; in ad7768_read_raw()
387 *val = (scale_uv * 2) / 1000; in ad7768_read_raw()
Dmxs-lradc-adc.c696 u64 scale_uv; in mxs_lradc_adc_probe() local
782 scale_uv = ((u64)adc->vref_mv[i] * 100000000) >> in mxs_lradc_adc_probe()
785 do_div(scale_uv, 100000000) * 10; in mxs_lradc_adc_probe()
786 adc->scale_avail[i][s].integer = scale_uv; in mxs_lradc_adc_probe()
Dad7192.c389 unsigned long long scale_uv; in ad7192_setup() local
457 scale_uv = ((u64)st->int_vref_mv * 100000000) in ad7192_setup()
460 scale_uv >>= i; in ad7192_setup()
462 st->scale_avail[i][1] = do_div(scale_uv, 100000000) * 10; in ad7192_setup()
463 st->scale_avail[i][0] = scale_uv; in ad7192_setup()
/drivers/iio/dac/
Dad5449.c137 int scale_uv; in ad5449_read_raw() local
155 scale_uv = regulator_get_voltage(reg->consumer); in ad5449_read_raw()
156 if (scale_uv < 0) in ad5449_read_raw()
157 return scale_uv; in ad5449_read_raw()
159 *val = scale_uv / 1000; in ad5449_read_raw()
Dad5360.c377 int scale_uv; in ad5360_read_raw() local
389 scale_uv = ad5360_get_channel_vref(st, chan->channel); in ad5360_read_raw()
390 if (scale_uv < 0) in ad5360_read_raw()
391 return scale_uv; in ad5360_read_raw()
394 *val = scale_uv * 4 / 1000; in ad5360_read_raw()
Dad5064.c322 int scale_uv; in ad5064_read_raw() local
329 scale_uv = ad5064_get_vref(st, chan); in ad5064_read_raw()
330 if (scale_uv < 0) in ad5064_read_raw()
331 return scale_uv; in ad5064_read_raw()
333 *val = scale_uv / 1000; in ad5064_read_raw()