Home
last modified time | relevance | path

Searched refs:vref_mv (Results 1 – 25 of 35) sorted by relevance

12

/Linux-v5.4/drivers/hwmon/
Dads7828.c109 unsigned int vref_mv = ADS7828_INT_VREF_MV; in ads7828_probe() local
124 if (ext_vref && pdata->vref_mv) in ads7828_probe()
125 vref_mv = pdata->vref_mv; in ads7828_probe()
132 vref_mv = DIV_ROUND_CLOSEST(vref_uv, 1000); in ads7828_probe()
133 if (vref_mv < ADS7828_EXT_VREF_MV_MIN || in ads7828_probe()
134 vref_mv > ADS7828_EXT_VREF_MV_MAX) in ads7828_probe()
147 vref_mv = clamp_val(vref_mv, ADS7828_EXT_VREF_MV_MIN, in ads7828_probe()
152 data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 4096); in ads7828_probe()
156 data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 256); in ads7828_probe()
/Linux-v5.4/drivers/iio/dac/
Dltc2632.c36 const int vref_mv; member
49 int vref_mv; member
93 *val = st->vref_mv; in ltc2632_read_raw()
206 .vref_mv = 2500,
210 .vref_mv = 2500,
214 .vref_mv = 2500,
218 .vref_mv = 4096,
222 .vref_mv = 4096,
226 .vref_mv = 4096,
253 st->vref_mv = chip_info->vref_mv; in ltc2632_probe()
[all …]
Dmax517.c35 unsigned short vref_mv[8]; member
77 *val = data->vref_mv[chan->channel]; in max517_read_raw()
187 data->vref_mv[chan] = 5000; /* mV */ in max517_probe()
189 data->vref_mv[chan] = platform_data->vref_mv[chan]; in max517_probe()
Dad5791.c87 unsigned short vref_mv; member
267 *val = st->vref_mv; in ad5791_read_raw()
272 do_div(val64, st->vref_mv); in ad5791_read_raw()
385 st->vref_mv = (pos_voltage_uv + neg_voltage_uv) / 1000; in ad5791_probe()
388 st->vref_mv = pdata->vref_pos_mv + pdata->vref_neg_mv; in ad5791_probe()
402 st->ctrl = AD5761_CTRL_LINCOMP(st->chip_info->get_lin_comp(st->vref_mv)) in ad5791_probe()
Dad5504.c53 unsigned short vref_mv; member
113 *val = st->vref_mv; in ad5504_read_raw()
299 st->vref_mv = voltage_uv / 1000; in ad5504_probe()
301 st->vref_mv = pdata->vref_mv; in ad5504_probe()
Dmcp4922.c30 unsigned int vref_mv; member
72 *val = state->vref_mv; in mcp4922_read_raw()
151 state->vref_mv = ret / 1000; in mcp4922_probe()
Dad5624r_spi.c55 *val = st->vref_mv; in ad5624r_read_raw()
250 st->vref_mv = voltage_uv / 1000; in ad5624r_probe()
252 st->vref_mv = st->chip_info->int_vref_mv; in ad5624r_probe()
Dstm32-dac-core.c100 priv->common.vref_mv = ret / 1000; in stm32_dac_probe()
101 dev_dbg(dev, "vref+=%dmV\n", priv->common.vref_mv); in stm32_dac_probe()
Dstm32-dac-core.h34 int vref_mv; member
Dad5446.c40 unsigned short vref_mv; member
176 *val = st->vref_mv; in ad5446_read_raw()
260 st->vref_mv = st->chip_info->int_vref_mv; in ad5446_probe()
262 st->vref_mv = voltage_uv / 1000; in ad5446_probe()
Dmax5821.c36 unsigned short vref_mv; member
247 *val = data->vref_mv; in max5821_read_raw()
341 data->vref_mv = ret / 1000; in max5821_probe()
Dad5624r.h58 unsigned short vref_mv; member
Dad5686.c139 *val = st->vref_mv; in ad5686_read_raw()
456 st->vref_mv = voltage_uv / 1000; in ad5686_probe()
458 st->vref_mv = st->chip_info->int_vref_mv; in ad5686_probe()
Dad5686.h127 unsigned short vref_mv; member
/Linux-v5.4/drivers/iio/adc/
Dti-ads8688.c69 unsigned int vref_mv; member
124 ads8688_range_def[0].scale * st->vref_mv, in ads8688_show_scales()
125 ads8688_range_def[1].scale * st->vref_mv, in ads8688_show_scales()
126 ads8688_range_def[2].scale * st->vref_mv); in ads8688_show_scales()
262 scale_mv = st->vref_mv; in ads8688_read_raw()
305 if (offset == 0 && val2 == ads8688_range_def[0].scale * st->vref_mv) { in ads8688_write_raw()
312 if (val2 == ads8688_range_def[i].scale * st->vref_mv && in ads8688_write_raw()
437 st->vref_mv = ret / 1000; in ads8688_probe()
440 st->vref_mv = ADS8688_VREF_MV; in ads8688_probe()
Dad7793.c256 unsigned int vref_mv) in ad7793_setup() argument
329 scale_uv = ((u64)vref_mv * 100000000) in ad7793_setup()
709 int ret, vref_mv = 0; in ad7793_probe() local
738 vref_mv = regulator_get_voltage(st->reg); in ad7793_probe()
739 if (vref_mv < 0) { in ad7793_probe()
740 ret = vref_mv; in ad7793_probe()
744 vref_mv /= 1000; in ad7793_probe()
746 vref_mv = 1170; /* Build-in ref */ in ad7793_probe()
766 ret = ad7793_setup(indio_dev, pdata, vref_mv); in ad7793_probe()
Dad7124.c116 unsigned int vref_mv; member
304 *val = st->channel_config[chan->address].vref_mv; in ad7124_read_raw()
349 vref = st->channel_config[chan->address].vref_mv * 1000000LL; in ad7124_write_raw()
420 st->channel_config[channel_number].vref_mv = in ad7124_init_channel_vref()
423 st->channel_config[channel_number].vref_mv /= 1000; in ad7124_init_channel_vref()
426 st->channel_config[channel_number].vref_mv = 2500; in ad7124_init_channel_vref()
Dnau7802.c55 u32 vref_mv; member
342 *val = st->vref_mv; in nau7802_read_raw()
465 st->vref_mv = tmp; in nau7802_probe()
489 st->scale_avail[i] = (((u64)st->vref_mv) * 1000000000ULL) in nau7802_probe()
Dad7266.c29 unsigned long vref_mv; member
168 scale_mv = st->vref_mv; in ad7266_read_raw()
406 st->vref_mv = ret / 1000; in ad7266_probe()
412 st->vref_mv = 2500; in ad7266_probe()
Dti-ads7950.c78 unsigned int vref_mv; member
351 if (st->vref_mv) { in ti_ads7950_get_range()
352 vref = st->vref_mv; in ti_ads7950_get_range()
599 st->vref_mv = TI_ADS7950_VA_MV_ACPI_DEFAULT; in ti_ads7950_probe()
/Linux-v5.4/include/linux/iio/dac/
Dad5504.h12 u16 vref_mv; member
Dmax517.h11 u16 vref_mv[8]; member
/Linux-v5.4/include/linux/platform_data/
Dads7828.h23 unsigned int vref_mv; member
/Linux-v5.4/include/linux/spi/
Dads7846.h18 u16 vref_mv; /* external vref value, milliVolts member
/Linux-v5.4/drivers/input/touchscreen/
Dads7846.c106 u16 vref_mv; member
460 retval *= ts->vref_mv; in SHOW()
513 if (!ts->vref_mv) { in ads784x_hwmon_register()
515 ts->vref_mv = 2500; in ads784x_hwmon_register()
521 if (!ts->vref_mv) { in ads784x_hwmon_register()
1208 of_property_read_u16(node, "ti,vref-mv", &pdata->vref_mv); in ads7846_probe_dt()
1320 ts->vref_mv = pdata->vref_mv; in ads7846_probe()

12