Home
last modified time | relevance | path

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

/Linux-v5.4/drivers/iio/adc/
Dad7476.c111 int scale_uv; in ad7476_read_raw() local
128 scale_uv = regulator_get_voltage(st->reg); in ad7476_read_raw()
129 if (scale_uv < 0) in ad7476_read_raw()
130 return scale_uv; in ad7476_read_raw()
132 scale_uv = st->chip_info->int_vref_uv; in ad7476_read_raw()
134 *val = scale_uv / 1000; in ad7476_read_raw()
Dad7766.c133 int scale_uv; in ad7766_read_raw() local
137 scale_uv = regulator_get_voltage(vref); in ad7766_read_raw()
138 if (scale_uv < 0) in ad7766_read_raw()
139 return scale_uv; in ad7766_read_raw()
140 *val = scale_uv / 1000; in ad7766_read_raw()
Dad7793.c260 unsigned long long scale_uv; in ad7793_setup() local
329 scale_uv = ((u64)vref_mv * 100000000) in ad7793_setup()
332 scale_uv >>= i; in ad7793_setup()
334 st->scale_avail[i][1] = do_div(scale_uv, 100000000) * 10; in ad7793_setup()
335 st->scale_avail[i][0] = scale_uv; in ad7793_setup()
403 unsigned long long scale_uv; in ad7793_read_raw() local
425 scale_uv = (1170ULL * 1000000000ULL * 6ULL); in ad7793_read_raw()
429 scale_uv = 1444444444444444ULL; in ad7793_read_raw()
435 scale_uv >>= (chan->scan_type.realbits - (unipolar ? 0 : 1)); in ad7793_read_raw()
437 *val2 = scale_uv; in ad7793_read_raw()
Dad7768-1.c359 int scale_uv, ret; in ad7768_read_raw() local
378 scale_uv = regulator_get_voltage(st->vref); in ad7768_read_raw()
379 if (scale_uv < 0) in ad7768_read_raw()
380 return scale_uv; in ad7768_read_raw()
382 *val = (scale_uv * 2) / 1000; in ad7768_read_raw()
Dmxs-lradc-adc.c697 u64 scale_uv; in mxs_lradc_adc_probe() local
784 scale_uv = ((u64)adc->vref_mv[i] * 100000000) >> in mxs_lradc_adc_probe()
787 do_div(scale_uv, 100000000) * 10; in mxs_lradc_adc_probe()
788 adc->scale_avail[i][s].integer = scale_uv; in mxs_lradc_adc_probe()
/Linux-v5.4/drivers/iio/dac/
Dad5449.c135 int scale_uv; in ad5449_read_raw() local
153 scale_uv = regulator_get_voltage(reg->consumer); in ad5449_read_raw()
154 if (scale_uv < 0) in ad5449_read_raw()
155 return scale_uv; in ad5449_read_raw()
157 *val = scale_uv / 1000; in ad5449_read_raw()
Dad5360.c374 int scale_uv; in ad5360_read_raw() local
386 scale_uv = ad5360_get_channel_vref(st, chan->channel); in ad5360_read_raw()
387 if (scale_uv < 0) in ad5360_read_raw()
388 return scale_uv; in ad5360_read_raw()
391 *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()
/Linux-v5.4/drivers/staging/iio/adc/
Dad7192.c259 unsigned long long scale_uv; in ad7192_setup() local
327 scale_uv = ((u64)st->int_vref_mv * 100000000) in ad7192_setup()
330 scale_uv >>= i; in ad7192_setup()
332 st->scale_avail[i][1] = do_div(scale_uv, 100000000) * 10; in ad7192_setup()
333 st->scale_avail[i][0] = scale_uv; in ad7192_setup()