Home
last modified time | relevance | path

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

12

/linux/drivers/iio/dac/
H A Dltc2632.c36 const int vref_mv; member
49 int vref_mv; member
103 *val = st->vref_mv; in ltc2632_read_raw()
219 .vref_mv = 2500,
224 .vref_mv = 2500,
229 .vref_mv = 2500,
234 .vref_mv = 4096,
239 .vref_mv = 4096,
244 .vref_mv = 4096,
249 .vref_mv = 2500,
[all …]
H A Dmax517.c35 unsigned short vref_mv[8]; member
77 *val = data->vref_mv[chan->channel]; in max517_read_raw()
183 data->vref_mv[chan] = 5000; /* mV */ in max517_probe()
185 data->vref_mv[chan] = platform_data->vref_mv[chan]; in max517_probe()
H A Dad5791.c89 unsigned short vref_mv; member
265 *val = st->vref_mv; in ad5791_read_raw()
270 do_div(val64, st->vref_mv); in ad5791_read_raw()
390 st->vref_mv = (pos_voltage_uv + neg_voltage_uv) / 1000; in ad5791_probe()
393 st->vref_mv = pdata->vref_pos_mv + pdata->vref_neg_mv; in ad5791_probe()
407 st->ctrl = AD5761_CTRL_LINCOMP(st->chip_info->get_lin_comp(st->vref_mv)) in ad5791_probe()
H A Dad5504.c53 unsigned short vref_mv; member
112 *val = st->vref_mv; in ad5504_read_raw()
298 st->vref_mv = voltage_uv / 1000; in ad5504_probe()
300 st->vref_mv = pdata->vref_mv; in ad5504_probe()
H A Dmcp4922.c32 unsigned int vref_mv; member
73 *val = state->vref_mv; in mcp4922_read_raw()
139 state->vref_mv = ret / 1000; in mcp4922_probe()
H A Dad5624r_spi.c55 *val = st->vref_mv; in ad5624r_read_raw()
266 st->vref_mv = voltage_uv / 1000; in ad5624r_probe()
268 st->vref_mv = st->chip_info->int_vref_mv; in ad5624r_probe()
H A Dad5446.c47 unsigned short vref_mv; member
184 *val = st->vref_mv; in ad5446_read_raw()
268 st->vref_mv = st->chip_info->int_vref_mv; in ad5446_probe()
270 st->vref_mv = voltage_uv / 1000; in ad5446_probe()
H A Dmax5821.c36 unsigned short vref_mv; member
247 *val = data->vref_mv; in max5821_read_raw()
351 data->vref_mv = ret / 1000; in max5821_probe()
H A Dstm32-dac-core.h34 int vref_mv; member
H A Dstm32-dac-core.c138 priv->common.vref_mv = ret / 1000; in stm32_dac_probe()
139 dev_dbg(dev, "vref+=%dmV\n", priv->common.vref_mv); in stm32_dac_probe()
H A Dad5624r.h58 unsigned short vref_mv; member
/linux/drivers/hwmon/
H A Dads7828.c108 unsigned int vref_mv = ADS7828_INT_VREF_MV; in ads7828_probe() local
123 if (ext_vref && pdata->vref_mv) in ads7828_probe()
124 vref_mv = pdata->vref_mv; in ads7828_probe()
131 vref_mv = DIV_ROUND_CLOSEST(vref_uv, 1000); in ads7828_probe()
132 if (vref_mv < ADS7828_EXT_VREF_MV_MIN || in ads7828_probe()
133 vref_mv > ADS7828_EXT_VREF_MV_MAX) in ads7828_probe()
142 vref_mv = clamp_val(vref_mv, ADS7828_EXT_VREF_MV_MIN, in ads7828_probe()
147 data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 4096); in ads7828_probe()
151 data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 256); in ads7828_probe()
/linux/drivers/iio/adc/
H A Daspeed_adc.c117 int vref_mv; member
320 *val = data->vref_mv; in aspeed_adc_read_raw()
413 data->vref_mv = data->model_data->vref_fixed_mv; in aspeed_adc_vref_config()
424 data->vref_mv = ret / 1000; in aspeed_adc_vref_config()
426 if ((data->vref_mv >= 1550) && (data->vref_mv <= 2700)) in aspeed_adc_vref_config()
432 else if ((data->vref_mv >= 900) && (data->vref_mv <= 1650)) in aspeed_adc_vref_config()
440 data->vref_mv); in aspeed_adc_vref_config()
444 data->vref_mv = 2500000; in aspeed_adc_vref_config()
447 &data->vref_mv); in aspeed_adc_vref_config()
449 data->vref_mv /= 1000; in aspeed_adc_vref_config()
[all …]
H A Dad4695.c132 unsigned int vref_mv; member
377 static int ad4695_set_ref_voltage(struct ad4695_state *st, int vref_mv) in ad4695_set_ref_voltage() argument
381 if (vref_mv >= 2400 && vref_mv <= 2750) in ad4695_set_ref_voltage()
383 else if (vref_mv > 2750 && vref_mv <= 3250) in ad4695_set_ref_voltage()
385 else if (vref_mv > 3250 && vref_mv <= 3750) in ad4695_set_ref_voltage()
387 else if (vref_mv > 3750 && vref_mv <= 4500) in ad4695_set_ref_voltage()
389 else if (vref_mv > 4500 && vref_mv <= 5100) in ad4695_set_ref_voltage()
648 *val = st->vref_mv; in ad4695_read_raw()
653 *val = st->vref_mv * -556; in ad4695_read_raw()
663 *val = st->com_mv * (1 << realbits) / st->vref_mv; in ad4695_read_raw()
[all …]
H A Dti-ads8688.c68 unsigned int vref_mv; member
123 ads8688_range_def[0].scale * st->vref_mv, in ads8688_show_scales()
124 ads8688_range_def[1].scale * st->vref_mv, in ads8688_show_scales()
125 ads8688_range_def[2].scale * st->vref_mv); in ads8688_show_scales()
261 scale_mv = st->vref_mv; in ads8688_read_raw()
302 if (offset == 0 && val2 == ads8688_range_def[0].scale * st->vref_mv) { in ads8688_write_raw()
309 if (val2 == ads8688_range_def[i].scale * st->vref_mv && in ads8688_write_raw()
427 st->vref_mv = ret == -ENODEV ? ADS8688_VREF_MV : ret / 1000; in ads8688_probe()
H A Dsd_adc_modulator.c32 int vref_mv; member
60 *val = priv->vref_mv; in iio_sd_mod_read()
136 priv->vref_mv = ret / 1000; in iio_sd_mod_probe()
H A Dltc2309.c40 int vref_mv; member
147 *val = ltc2309->vref_mv; in ltc2309_read_raw()
184 ltc2309->vref_mv = ret == -ENODEV ? LTC2309_INTERNAL_REF_MV : ret / 1000; in ltc2309_probe()
H A Dad7292.c84 unsigned short vref_mv; member
241 *val = st->vref_mv * ret; in ad7292_read_raw()
278 st->vref_mv = ret == -ENODEV ? AD7292_INTERNAL_REF_MV : ret / 1000; in ad7292_probe()
H A Dnau7802.c56 u32 vref_mv; member
343 *val = st->vref_mv; in nau7802_read_raw()
455 st->vref_mv = tmp; in nau7802_probe()
479 st->scale_avail[i] = (((u64)st->vref_mv) * 1000000000ULL) in nau7802_probe()
H A Dad7793.c256 unsigned int vref_mv) in ad7793_setup() argument
330 scale_uv = ((u64)vref_mv * 100000000) in ad7793_setup()
776 int ret, vref_mv = 0; in ad7793_probe() local
801 vref_mv = ret / 1000; in ad7793_probe()
803 vref_mv = 1170; /* Build-in ref */ in ad7793_probe()
819 ret = ad7793_setup(indio_dev, pdata, vref_mv); in ad7793_probe()
/linux/include/linux/iio/dac/
H A Dad5504.h12 u16 vref_mv; member
H A Dmax517.h11 u16 vref_mv[8]; member
/linux/include/linux/platform_data/
H A Dads7828.h23 unsigned int vref_mv; member
/linux/include/linux/spi/
H A Dads7846.h7 u16 vref_mv; /* external vref value, milliVolts member
/linux/drivers/input/touchscreen/
H A Dads7846.c103 u16 vref_mv; member
502 retval *= ts->vref_mv; in SHOW()
557 if (!ts->vref_mv) { in ads784x_hwmon_register()
559 ts->vref_mv = 2500; in ads784x_hwmon_register()
565 if (!ts->vref_mv) { in ads784x_hwmon_register()
1156 device_property_read_u16(dev, "ti,vref-mv", &pdata->vref_mv); in ads7846_get_props()
1268 ts->vref_mv = pdata->vref_mv; in ads7846_probe()

12