/drivers/iio/adc/ |
D | fsl-imx25-gcq.c | 44 struct regulator *vref[4]; member 196 priv->vref[MX25_ADC_REFP_INT] = NULL; in mx25_gcq_setup_cfgs() 197 priv->vref[MX25_ADC_REFP_EXT] = in mx25_gcq_setup_cfgs() 199 priv->vref[MX25_ADC_REFP_XP] = in mx25_gcq_setup_cfgs() 201 priv->vref[MX25_ADC_REFP_YP] = in mx25_gcq_setup_cfgs() 230 if (IS_ERR(priv->vref[refp])) { in mx25_gcq_setup_cfgs() 234 return PTR_ERR(priv->vref[refp]); in mx25_gcq_setup_cfgs() 237 regulator_get_voltage(priv->vref[refp]); in mx25_gcq_setup_cfgs() 285 if (!IS_ERR_OR_NULL(priv->vref[i])) in mx25_gcq_setup_cfgs() 286 devm_regulator_put(priv->vref[i]); in mx25_gcq_setup_cfgs() [all …]
|
D | rcar-gyroadc.c | 77 struct regulator *vref[8]; member 195 unsigned int vref; in rcar_gyroadc_read_raw() local 203 consumer = priv->vref[0]; in rcar_gyroadc_read_raw() 205 consumer = priv->vref[chan->channel]; in rcar_gyroadc_read_raw() 240 vref = regulator_get_voltage(consumer); in rcar_gyroadc_read_raw() 241 *val = vref / 1000; in rcar_gyroadc_read_raw() 337 struct regulator *vref; in rcar_gyroadc_parse_subdevs() local 409 vref = devm_regulator_get(dev, "vref"); in rcar_gyroadc_parse_subdevs() 411 if (IS_ERR(vref)) { in rcar_gyroadc_parse_subdevs() 414 return PTR_ERR(vref); in rcar_gyroadc_parse_subdevs() [all …]
|
D | rockchip_saradc.c | 57 struct regulator *vref; member 96 ret = regulator_get_voltage(info->vref); in rockchip_saradc_read_raw() 281 info->vref = devm_regulator_get(&pdev->dev, "vref"); in rockchip_saradc_probe() 282 if (IS_ERR(info->vref)) { in rockchip_saradc_probe() 284 PTR_ERR(info->vref)); in rockchip_saradc_probe() 285 return PTR_ERR(info->vref); in rockchip_saradc_probe() 301 ret = regulator_enable(info->vref); in rockchip_saradc_probe() 341 regulator_disable(info->vref); in rockchip_saradc_probe() 353 regulator_disable(info->vref); in rockchip_saradc_remove() 366 regulator_disable(info->vref); in rockchip_saradc_suspend() [all …]
|
D | lpc18xx_adc.c | 46 struct regulator *vref; member 108 *val = regulator_get_voltage(adc->vref) / 1000; in lpc18xx_adc_read_raw() 154 adc->vref = devm_regulator_get(&pdev->dev, "vref"); in lpc18xx_adc_probe() 155 if (IS_ERR(adc->vref)) { in lpc18xx_adc_probe() 157 return PTR_ERR(adc->vref); in lpc18xx_adc_probe() 167 ret = regulator_enable(adc->vref); in lpc18xx_adc_probe() 195 regulator_disable(adc->vref); in lpc18xx_adc_probe() 208 regulator_disable(adc->vref); in lpc18xx_adc_remove()
|
D | imx7d_adc.c | 121 struct regulator *vref; member 327 info->vref_uv = regulator_get_voltage(info->vref); in imx7d_adc_read_raw() 476 info->vref = devm_regulator_get(&pdev->dev, "vref"); in imx7d_adc_probe() 477 if (IS_ERR(info->vref)) { in imx7d_adc_probe() 478 ret = PTR_ERR(info->vref); in imx7d_adc_probe() 484 ret = regulator_enable(info->vref); in imx7d_adc_probe() 533 regulator_disable(info->vref); in imx7d_adc_probe() 548 regulator_disable(info->vref); in imx7d_adc_remove() 561 regulator_disable(info->vref); in imx7d_adc_suspend() 572 ret = regulator_enable(info->vref); in imx7d_adc_resume() [all …]
|
D | ti-tlc4541.c | 114 int vref; in tlc4541_get_range() local 116 vref = regulator_get_voltage(st->reg); in tlc4541_get_range() 117 if (vref < 0) in tlc4541_get_range() 118 return vref; in tlc4541_get_range() 120 vref /= 1000; in tlc4541_get_range() 122 return vref; in tlc4541_get_range()
|
D | ad7923.c | 211 int vref; in ad7923_get_range() local 213 vref = regulator_get_voltage(st->reg); in ad7923_get_range() 214 if (vref < 0) in ad7923_get_range() 215 return vref; in ad7923_get_range() 217 vref /= 1000; in ad7923_get_range() 220 vref *= 2; in ad7923_get_range() 222 return vref; in ad7923_get_range()
|
D | stm32-adc-core.c | 87 struct regulator *vref; member 396 priv->vref = devm_regulator_get(&pdev->dev, "vref"); in stm32_adc_probe() 397 if (IS_ERR(priv->vref)) { in stm32_adc_probe() 398 ret = PTR_ERR(priv->vref); in stm32_adc_probe() 403 ret = regulator_enable(priv->vref); in stm32_adc_probe() 409 ret = regulator_get_voltage(priv->vref); in stm32_adc_probe() 485 regulator_disable(priv->vref); in stm32_adc_probe() 501 regulator_disable(priv->vref); in stm32_adc_remove()
|
D | ti-ads7950.c | 314 int vref; in ti_ads7950_get_range() local 317 vref = st->vref_mv; in ti_ads7950_get_range() 319 vref = regulator_get_voltage(st->reg); in ti_ads7950_get_range() 320 if (vref < 0) in ti_ads7950_get_range() 321 return vref; in ti_ads7950_get_range() 323 vref /= 1000; in ti_ads7950_get_range() 327 vref *= 2; in ti_ads7950_get_range() 329 return vref; in ti_ads7950_get_range()
|
D | vf610_adc.c | 175 struct regulator *vref; member 858 info->vref = devm_regulator_get(&pdev->dev, "vref"); in vf610_adc_probe() 859 if (IS_ERR(info->vref)) in vf610_adc_probe() 860 return PTR_ERR(info->vref); in vf610_adc_probe() 862 ret = regulator_enable(info->vref); in vf610_adc_probe() 866 info->vref_uv = regulator_get_voltage(info->vref); in vf610_adc_probe() 918 regulator_disable(info->vref); in vf610_adc_probe() 930 regulator_disable(info->vref); in vf610_adc_remove() 949 regulator_disable(info->vref); in vf610_adc_suspend() 960 ret = regulator_enable(info->vref); in vf610_adc_resume() [all …]
|
D | at91-sama5d2_adc.c | 236 struct regulator *vref; member 740 st->vref = devm_regulator_get(&pdev->dev, "vref"); in at91_adc_probe() 741 if (IS_ERR(st->vref)) in at91_adc_probe() 742 return PTR_ERR(st->vref); in at91_adc_probe() 753 ret = regulator_enable(st->vref); in at91_adc_probe() 757 st->vref_uv = regulator_get_voltage(st->vref); in at91_adc_probe() 801 regulator_disable(st->vref); in at91_adc_probe() 816 regulator_disable(st->vref); in at91_adc_remove() 837 regulator_disable(st->vref); in at91_adc_suspend() 858 ret = regulator_enable(st->vref); in at91_adc_resume() [all …]
|
D | ad7298.c | 218 int vref; in ad7298_get_ref_voltage() local 221 vref = regulator_get_voltage(st->reg); in ad7298_get_ref_voltage() 222 if (vref < 0) in ad7298_get_ref_voltage() 223 return vref; in ad7298_get_ref_voltage() 225 return vref / 1000; in ad7298_get_ref_voltage()
|
D | ad799x.c | 131 struct regulator *vref; member 297 ret = regulator_get_voltage(st->vref); in ad799x_read_raw() 798 st->vref = devm_regulator_get(&client->dev, "vref"); in ad799x_probe() 799 if (IS_ERR(st->vref)) { in ad799x_probe() 800 ret = PTR_ERR(st->vref); in ad799x_probe() 803 ret = regulator_enable(st->vref); in ad799x_probe() 852 regulator_disable(st->vref); in ad799x_probe() 867 regulator_disable(st->vref); in ad799x_remove()
|
D | ad7291.c | 381 int vref; in ad7291_read_raw() local 383 vref = regulator_get_voltage(chip->reg); in ad7291_read_raw() 384 if (vref < 0) in ad7291_read_raw() 385 return vref; in ad7291_read_raw() 386 *val = vref / 1000; in ad7291_read_raw()
|
D | max1363.c | 185 struct regulator *vref; member 1437 if (st->vref) in max1363_initial_setup() 1579 struct regulator *vref; in max1363_probe() local 1616 vref = devm_regulator_get_optional(&client->dev, "vref"); in max1363_probe() 1617 if (!IS_ERR(vref)) { in max1363_probe() 1620 ret = regulator_enable(vref); in max1363_probe() 1623 st->vref = vref; in max1363_probe() 1624 vref_uv = regulator_get_voltage(vref); in max1363_probe() 1686 if (st->vref) in max1363_probe() 1687 regulator_disable(st->vref); in max1363_probe() [all …]
|
/drivers/iio/dac/ |
D | dpot-dac.c | 41 struct regulator *vref; member 73 tmp *= regulator_get_voltage(dac->vref) / 1000; in dpot_dac_read_raw() 86 *val *= regulator_get_voltage(dac->vref) / 1000; in dpot_dac_read_raw() 190 dac->vref = devm_regulator_get(dev, "vref"); in dpot_dac_probe() 191 if (IS_ERR(dac->vref)) { in dpot_dac_probe() 192 if (PTR_ERR(dac->vref) != -EPROBE_DEFER) in dpot_dac_probe() 194 return PTR_ERR(dac->vref); in dpot_dac_probe() 218 ret = regulator_enable(dac->vref); in dpot_dac_probe() 233 regulator_disable(dac->vref); in dpot_dac_probe() 243 regulator_disable(dac->vref); in dpot_dac_remove()
|
D | stm32-dac-core.c | 41 struct regulator *vref; member 94 priv->vref = devm_regulator_get(dev, "vref"); in stm32_dac_probe() 95 if (IS_ERR(priv->vref)) { in stm32_dac_probe() 96 ret = PTR_ERR(priv->vref); in stm32_dac_probe() 101 ret = regulator_enable(priv->vref); in stm32_dac_probe() 107 ret = regulator_get_voltage(priv->vref); in stm32_dac_probe() 159 regulator_disable(priv->vref); in stm32_dac_probe() 171 regulator_disable(priv->vref); in stm32_dac_remove()
|
D | lpc18xx_dac.c | 37 struct regulator *vref; member 68 *val = regulator_get_voltage(dac->vref) / 1000; in lpc18xx_dac_read_raw() 135 dac->vref = devm_regulator_get(&pdev->dev, "vref"); in lpc18xx_dac_probe() 136 if (IS_ERR(dac->vref)) { in lpc18xx_dac_probe() 138 return PTR_ERR(dac->vref); in lpc18xx_dac_probe() 148 ret = regulator_enable(dac->vref); in lpc18xx_dac_probe() 174 regulator_disable(dac->vref); in lpc18xx_dac_probe() 187 regulator_disable(dac->vref); in lpc18xx_dac_remove()
|
D | ad5764.c | 226 int vref; in ad5764_read_raw() local 253 vref = ad5764_get_channel_vref(st, chan->channel); in ad5764_read_raw() 254 if (vref < 0) in ad5764_read_raw() 255 return vref; in ad5764_read_raw() 257 *val = vref * 4 / 1000; in ad5764_read_raw()
|
D | ad5761.c | 68 int vref; member 217 *val = st->vref * ad5761_range_params[st->range].m; in ad5761_read_raw() 305 st->vref = chip_info->int_vref; in ad5761_get_vref() 336 st->vref = ret / 1000; in ad5761_get_vref()
|
/drivers/input/touchscreen/ |
D | ads7846.c | 182 #define READ_12BIT_DFR(x, adc, vref) (ADS_START | ADS_A2A1A0_d_ ## x \ argument 184 (adc ? ADS_PD10_ADC_ON : 0) | (vref ? ADS_PD10_REF_ON : 0)) 186 #define READ_Y(vref) (READ_12BIT_DFR(y, 1, vref)) argument 187 #define READ_Z1(vref) (READ_12BIT_DFR(z1, 1, vref)) argument 188 #define READ_Z2(vref) (READ_12BIT_DFR(z2, 1, vref)) argument 190 #define READ_X(vref) (READ_12BIT_DFR(x, 1, vref)) argument 982 int vref = pdata->keep_vref_on; in ads7846_setup_spi_msg() local 991 vref = 0; in ads7846_setup_spi_msg() 999 packet->read_y_cmd[0] = READ_Y(vref); in ads7846_setup_spi_msg() 1008 packet->read_y = READ_Y(vref); in ads7846_setup_spi_msg() [all …]
|
/drivers/hwmon/ |
D | adc128d818.c | 71 int vref; /* Reference voltage in mV */ member 167 val = DIV_ROUND_CLOSEST(data->in[index][nr] * data->vref, 4095); in adc128_show_in() 471 int err, vref; in adc128_probe() local 484 vref = regulator_get_voltage(regulator); in adc128_probe() 485 if (vref < 0) { in adc128_probe() 486 err = vref; in adc128_probe() 489 data->vref = DIV_ROUND_CLOSEST(vref, 1000); in adc128_probe() 491 data->vref = 2560; /* 2.56V, in mV */ in adc128_probe()
|
D | smm665.c | 33 static int vref = SMM665_VREF_ADC_X1000; variable 34 module_param(vref, int, 0); 35 MODULE_PARM_DESC(vref, "Reference voltage in mV"); 119 #define SMM665_VMON_ADC_TO_VOLTS(adc) ((adc) * vref / 256) 122 #define SMM665_12VIN_ADC_TO_VOLTS(adc) ((adc) * vref * 3 / 256) 125 #define SMM665_AIN_ADC_TO_VOLTS(adc) ((adc) * vref / 512)
|
/drivers/iio/pressure/ |
D | zpa2326.c | 140 struct regulator *vref; member 343 err = regulator_enable(private->vref); in zpa2326_power_on() 349 goto vref; in zpa2326_power_on() 367 vref: in zpa2326_power_on() 368 regulator_disable(private->vref); in zpa2326_power_on() 387 regulator_disable(private->vref); in zpa2326_power_off() 1639 priv->vref = devm_regulator_get(parent, "vref"); in zpa2326_probe() 1640 if (IS_ERR(priv->vref)) in zpa2326_probe() 1641 return PTR_ERR(priv->vref); in zpa2326_probe()
|
/drivers/input/keyboard/ |
D | sun4i-lradc-keys.c | 79 u32 vref; member 101 voltage = val * lradc->vref / 63; in sun4i_lradc_irq() 132 lradc->vref = regulator_get_voltage(lradc->vref_supply) * 2 / 3; in sun4i_lradc_open()
|