/linux/drivers/iio/dac/ |
H A D | ltc2632.c | 36 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 D | max517.c | 35 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 D | ad5791.c | 89 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 D | ad5504.c | 53 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 D | mcp4922.c | 32 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 D | ad5624r_spi.c | 55 *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 D | ad5446.c | 47 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 D | max5821.c | 36 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 D | stm32-dac-core.h | 34 int vref_mv; member
|
H A D | stm32-dac-core.c | 138 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 D | ad5624r.h | 58 unsigned short vref_mv; member
|
/linux/drivers/hwmon/ |
H A D | ads7828.c | 108 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 D | aspeed_adc.c | 117 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 D | ad4695.c | 132 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 D | ti-ads8688.c | 68 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 D | sd_adc_modulator.c | 32 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 D | ltc2309.c | 40 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 D | ad7292.c | 84 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 D | nau7802.c | 56 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 D | ad7793.c | 256 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 D | ad5504.h | 12 u16 vref_mv; member
|
H A D | max517.h | 11 u16 vref_mv[8]; member
|
/linux/include/linux/platform_data/ |
H A D | ads7828.h | 23 unsigned int vref_mv; member
|
/linux/include/linux/spi/ |
H A D | ads7846.h | 7 u16 vref_mv; /* external vref value, milliVolts member
|
/linux/drivers/input/touchscreen/ |
H A D | ads7846.c | 103 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()
|