Home
last modified time | relevance | path

Searched refs:vref (Results 1 – 25 of 185) sorted by relevance

12345678

/linux/drivers/iio/adc/
H A Dsd_adc_modulator.c30 struct regulator *vref; member
38 if (priv->vref) in iio_sd_mod_enable()
39 return regulator_enable(priv->vref); in iio_sd_mod_enable()
48 if (priv->vref) in iio_sd_mod_disable()
49 regulator_disable(priv->vref); in iio_sd_mod_disable()
106 struct regulator *vref; in iio_sd_mod_probe() local
122 vref = devm_regulator_get_optional(dev, "vref"); in iio_sd_mod_probe()
123 if (IS_ERR(vref)) { in iio_sd_mod_probe()
124 if (PTR_ERR(vref) ! in iio_sd_mod_probe()
[all...]
H A Dlpc18xx_adc.c41 struct regulator *vref; member
103 *val = regulator_get_voltage(adc->vref) / 1000; in lpc18xx_adc_read_raw()
123 static void lpc18xx_regulator_disable(void *vref) in lpc18xx_regulator_disable() argument
125 regulator_disable(vref); in lpc18xx_regulator_disable()
153 adc->vref = devm_regulator_get(&pdev->dev, "vref"); in lpc18xx_adc_probe()
154 if (IS_ERR(adc->vref)) in lpc18xx_adc_probe()
155 return dev_err_probe(&pdev->dev, PTR_ERR(adc->vref), in lpc18xx_adc_probe()
164 ret = regulator_enable(adc->vref); in lpc18xx_adc_probe()
170 ret = devm_add_action_or_reset(&pdev->dev, lpc18xx_regulator_disable, adc->vref); in lpc18xx_adc_probe()
H A Dnpcm_adc.c33 struct regulator *vref; member
173 if (!IS_ERR(info->vref)) { in npcm_adc_read_raw()
174 vref_uv = regulator_get_voltage(info->vref); in npcm_adc_read_raw()
255 info->vref = devm_regulator_get_optional(&pdev->dev, "vref"); in npcm_adc_probe()
256 if (!IS_ERR(info->vref)) { in npcm_adc_probe()
257 ret = regulator_enable(info->vref); in npcm_adc_probe()
270 if (PTR_ERR(info->vref) != -ENODEV) in npcm_adc_probe()
271 return PTR_ERR(info->vref); in npcm_adc_probe()
308 if (!IS_ERR(info->vref)) in npcm_adc_probe()
309 regulator_disable(info->vref); in npcm_adc_probe()
[all …]
H A Dimx93_adc.c78 struct regulator *vref; member
269 ret = regulator_get_voltage(adc->vref); in imx93_adc_read_raw()
342 adc->vref = devm_regulator_get(dev, "vref"); in imx93_adc_probe()
343 if (IS_ERR(adc->vref)) in imx93_adc_probe()
344 return dev_err_probe(dev, PTR_ERR(adc->vref), in imx93_adc_probe()
347 ret = regulator_enable(adc->vref); in imx93_adc_probe()
403 regulator_disable(adc->vref); in imx93_adc_probe()
425 regulator_disable(adc->vref); in imx93_adc_remove()
435 regulator_disable(adc->vref); in imx93_adc_runtime_suspend()
446 ret = regulator_enable(adc->vref); in imx93_adc_runtime_resume()
[all …]
H A Dfsl-imx25-gcq.c41 struct regulator *vref[4]; member
180 if (priv->vref[refp]) in mx25_gcq_ext_regulator_setup()
188 priv->vref[refp] = devm_regulator_get_optional(dev, reg_name); in mx25_gcq_ext_regulator_setup()
189 if (IS_ERR(priv->vref[refp])) in mx25_gcq_ext_regulator_setup()
190 return dev_err_probe(dev, PTR_ERR(priv->vref[refp]), in mx25_gcq_ext_regulator_setup()
241 regulator_get_voltage(priv->vref[refp]); in mx25_gcq_setup_cfgs()
327 if (!priv->vref[i]) in mx25_gcq_probe()
330 ret = regulator_enable(priv->vref[i]); in mx25_gcq_probe()
335 priv->vref[i]); in mx25_gcq_probe()
H A Dimx8qxp-adc.c95 struct regulator *vref; member
248 ret = regulator_get_voltage(adc->vref); in imx8qxp_adc_read_raw()
338 adc->vref = devm_regulator_get(dev, "vref"); in imx8qxp_adc_probe()
339 if (IS_ERR(adc->vref)) in imx8qxp_adc_probe()
340 return dev_err_probe(dev, PTR_ERR(adc->vref), "Failed getting reference voltage\n"); in imx8qxp_adc_probe()
342 ret = regulator_enable(adc->vref); in imx8qxp_adc_probe()
397 regulator_disable(adc->vref); in imx8qxp_adc_probe()
416 regulator_disable(adc->vref); in imx8qxp_adc_remove()
431 regulator_disable(adc->vref); in imx8qxp_adc_runtime_suspend()
442 ret = regulator_enable(adc->vref); in imx8qxp_adc_runtime_resume()
[all …]
H A Dad7091r-base.c105 if (st->vref) { in ad7091r_read_raw()
106 ret = regulator_get_voltage(st->vref); in ad7091r_read_raw()
294 regulator_disable(st->vref); in ad7091r_remove()
346 st->vref = devm_regulator_get_optional(dev, "vref"); in ad7091r_probe()
347 if (IS_ERR(st->vref)) { in ad7091r_probe()
348 if (PTR_ERR(st->vref) == -EPROBE_DEFER) in ad7091r_probe()
351 st->vref = NULL; in ad7091r_probe()
359 ret = regulator_enable(st->vref); in ad7091r_probe()
H A Dti-tlc4541.c111 int vref; in tlc4541_get_range() local
113 vref = regulator_get_voltage(st->reg); in tlc4541_get_range()
114 if (vref < 0) in tlc4541_get_range()
115 return vref; in tlc4541_get_range()
117 vref /= 1000; in tlc4541_get_range()
119 return vref; in tlc4541_get_range()
H A Dimx7d_adc.c118 struct regulator *vref; member
320 info->vref_uv = regulator_get_voltage(info->vref); in imx7d_adc_read_raw()
436 ret = regulator_enable(info->vref); in imx7d_adc_enable()
448 regulator_disable(info->vref); in imx7d_adc_enable()
465 regulator_disable(info->vref); in imx7d_adc_disable()
502 info->vref = devm_regulator_get(dev, "vref"); in imx7d_adc_probe()
503 if (IS_ERR(info->vref)) in imx7d_adc_probe()
504 return dev_err_probe(dev, PTR_ERR(info->vref), in imx7d_adc_probe()
H A Dlpc32xx_adc.c51 struct regulator *vref; member
90 *val = regulator_get_voltage(st->vref) / 1000; in lpc32xx_read_raw()
190 st->vref = devm_regulator_get(&pdev->dev, "vref"); in lpc32xx_adc_probe()
191 if (IS_ERR(st->vref)) { in lpc32xx_adc_probe()
H A Dvf610_adc.c162 struct regulator *vref; member
820 regulator_disable(info->vref); in vf610_adc_action_remove()
859 info->vref = devm_regulator_get(&pdev->dev, "vref"); in vf610_adc_probe()
860 if (IS_ERR(info->vref)) in vf610_adc_probe()
861 return PTR_ERR(info->vref); in vf610_adc_probe()
863 ret = regulator_enable(info->vref); in vf610_adc_probe()
871 info->vref_uv = regulator_get_voltage(info->vref); in vf610_adc_probe()
917 regulator_disable(info->vref); in vf610_adc_suspend()
928 ret = regulator_enable(info->vref); in vf610_adc_resume()
941 regulator_disable(info->vref); in vf610_adc_resume()
H A Dad7298.c210 int vref; in ad7298_get_ref_voltage() local
213 vref = regulator_get_voltage(st->reg); in ad7298_get_ref_voltage()
214 if (vref < 0) in ad7298_get_ref_voltage()
215 return vref; in ad7298_get_ref_voltage()
217 return vref / 1000; in ad7298_get_ref_voltage()
H A Dstm32-adc-core.c96 * @vref: regulator reference
114 struct regulator *vref; member
552 ret = regulator_enable(priv->vref); in stm32_adc_core_hw_start()
554 dev_err(dev, "vref enable failed\n"); in stm32_adc_core_hw_start()
577 regulator_disable(priv->vref); in stm32_adc_core_hw_start()
595 regulator_disable(priv->vref); in stm32_adc_core_hw_stop()
735 priv->vref = devm_regulator_get(&pdev->dev, "vref"); in stm32_adc_probe()
736 if (IS_ERR(priv->vref)) in stm32_adc_probe()
737 return dev_err_probe(&pdev->dev, PTR_ERR(priv->vref), in stm32_adc_probe()
[all...]
H A Dad7124.c213 struct regulator *vref[4]; member
413 if (IS_ERR(st->vref[refsel])) in ad7124_init_config_vref()
414 return dev_err_probe(dev, PTR_ERR(st->vref[refsel]), in ad7124_init_config_vref()
418 cfg->vref_mv = regulator_get_voltage(st->vref[refsel]); in ad7124_init_config_vref()
854 unsigned int res, gain, full_scale, vref; in ad7124_write_raw() local
877 vref = st->channels[chan->address].cfg.vref_mv * 1000000LL; in ad7124_write_raw()
878 res = DIV_ROUND_CLOSEST(vref, full_scale); in ad7124_write_raw()
1626 for (i = 0; i < ARRAY_SIZE(st->vref); i++) { in ad7124_probe()
1630 st->vref[i] = devm_regulator_get_optional(&spi->dev, in ad7124_probe()
1632 if (PTR_ERR(st->vref[ in ad7124_probe()
[all...]
/linux/drivers/iio/dac/
H A Ddpot-dac.c37 struct regulator *vref; member
69 tmp *= regulator_get_voltage(dac->vref) / 1000; in dpot_dac_read_raw()
83 *val *= regulator_get_voltage(dac->vref) / 1000; in dpot_dac_read_raw()
185 dac->vref = devm_regulator_get(dev, "vref"); in dpot_dac_probe()
186 if (IS_ERR(dac->vref)) in dpot_dac_probe()
187 return dev_err_probe(&pdev->dev, PTR_ERR(dac->vref), in dpot_dac_probe()
209 ret = regulator_enable(dac->vref); in dpot_dac_probe()
224 regulator_disable(dac->vref); in dpot_dac_probe()
234 regulator_disable(dac->vref); in dpot_dac_remove()
H A Dlpc18xx_dac.c32 struct regulator *vref; member
63 *val = regulator_get_voltage(dac->vref) / 1000; in lpc18xx_dac_read_raw()
126 dac->vref = devm_regulator_get(&pdev->dev, "vref"); in lpc18xx_dac_probe()
127 if (IS_ERR(dac->vref)) in lpc18xx_dac_probe()
128 return dev_err_probe(&pdev->dev, PTR_ERR(dac->vref), in lpc18xx_dac_probe()
137 ret = regulator_enable(dac->vref); in lpc18xx_dac_probe()
163 regulator_disable(dac->vref); in lpc18xx_dac_probe()
176 regulator_disable(dac->vref); in lpc18xx_dac_remove()
H A Dstm32-dac-core.c25 * @vref: regulator reference
30 struct regulator *vref; member
60 ret = regulator_enable(priv->vref); in stm32_dac_core_hw_start()
62 dev_err(dev, "vref enable failed: %d\n", ret); in stm32_dac_core_hw_start()
75 regulator_disable(priv->vref); in stm32_dac_core_hw_start()
86 regulator_disable(priv->vref); in stm32_dac_core_hw_stop()
120 priv->vref = devm_regulator_get(dev, "vref"); in stm32_dac_probe()
121 if (IS_ERR(priv->vref)) in stm32_dac_probe()
122 return dev_err_probe(dev, PTR_ERR(priv->vref), "vre in stm32_dac_probe()
[all...]
H A Dti-dac082s085.c50 struct regulator *vref; member
199 ret = regulator_get_voltage(ti_dac->vref); in ti_dac_read_raw()
287 ti_dac->vref = devm_regulator_get(dev, "vref"); in ti_dac_probe()
288 if (IS_ERR(ti_dac->vref)) in ti_dac_probe()
289 return PTR_ERR(ti_dac->vref); in ti_dac_probe()
291 ret = regulator_enable(ti_dac->vref); in ti_dac_probe()
311 regulator_disable(ti_dac->vref); in ti_dac_probe()
322 regulator_disable(ti_dac->vref); in ti_dac_remove()
H A Dti-dac5571.c48 struct regulator *vref; member
252 ret = regulator_get_voltage(data->vref); in dac5571_read_raw()
335 data->vref = devm_regulator_get(dev, "vref"); in dac5571_probe()
336 if (IS_ERR(data->vref)) in dac5571_probe()
337 return PTR_ERR(data->vref); in dac5571_probe()
339 ret = regulator_enable(data->vref); in dac5571_probe()
374 regulator_disable(data->vref); in dac5571_probe()
384 regulator_disable(data->vref); in dac5571_remove()
H A Dad3552r-common.c99 s64 vref, tmp, common, offset, gn, gp; in ad3552r_get_custom_range() local
106 vref = 2500; in ad3552r_get_custom_range()
114 *v_max = vref + tmp; in ad3552r_get_custom_range()
119 *v_min = vref - tmp; in ad3552r_get_custom_range()
/linux/drivers/input/touchscreen/
H A Dads7846.c188 #define READ_12BIT_DFR(x, adc, vref) (ADS_START | ADS_A2A1A0_d_ ## x \ argument
190 (adc ? ADS_PD10_ADC_ON : 0) | (vref ? ADS_PD10_REF_ON : 0))
192 #define READ_Y(vref) (READ_12BIT_DFR(y, 1, vref)) argument
193 #define READ_Z1(vref) (READ_12BIT_DFR(z1, 1, vref)) argument
194 #define READ_Z2(vref) (READ_12BIT_DFR(z2, 1, vref)) argument
195 #define READ_X(vref) (READ_12BIT_DFR(x, 1, vref)) argument
722 ads7846_get_cmd(enum ads7846_cmds cmd_idx,int vref) ads7846_get_cmd() argument
1092 int vref = pdata->keep_vref_on; ads7846_halfd_spi_msg() local
1188 int vref = pdata->keep_vref_on; ads7846_setup_spi_msg() local
[all...]
/linux/arch/arm64/boot/dts/freescale/
H A Dimx8mq-nitrogen.dts61 reg_vref_0v9: regulator-vref-0v9 {
63 regulator-name = "vref-0v9";
68 reg_vref_1v8: regulator-vref-1v8 {
70 regulator-name = "vref-1v8";
75 reg_vref_2v5: regulator-vref-2v5 {
77 regulator-name = "vref-2v5";
82 reg_vref_3v3: regulator-vref-3v3 {
84 regulator-name = "vref-3v3";
89 reg_vref_5v: regulator-vref-5v {
91 regulator-name = "vref
[all...]
/linux/drivers/mfd/
H A Dwm8350-core.c188 int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref) in wm8350_read_auxadc() argument
195 && (scale != 0 || vref != 0)) in wm8350_read_auxadc()
204 if (scale || vref) { in wm8350_read_auxadc()
206 reg |= vref << 12; in wm8350_read_auxadc()
/linux/sound/hda/common/
H A Dproc.c345 unsigned int vref = in print_pin_caps() local
348 if (vref & AC_PINCAP_VREF_HIZ) in print_pin_caps()
350 if (vref & AC_PINCAP_VREF_50) in print_pin_caps()
352 if (vref & AC_PINCAP_VREF_GRD) in print_pin_caps()
354 if (vref & AC_PINCAP_VREF_80) in print_pin_caps()
356 if (vref & AC_PINCAP_VREF_100) in print_pin_caps()
416 int vref = pinctls & AC_PINCTL_VREFEN; in print_pin_ctls() local
417 switch (vref) { in print_pin_ctls()
/linux/arch/arm/boot/dts/nxp/imx/
H A Dimx7d-nitrogen7.dts80 reg_vref_1v8: regulator-vref-1v8 {
82 regulator-name = "vref-1v8";
87 reg_vref_3v3: regulator-vref-3v3 {
89 regulator-name = "vref-3v3";
112 vref-supply = <&reg_vref_1v8>;
117 vref-supply = <&reg_vref_1v8>;

12345678