/linux-6.12.1/drivers/iio/adc/ |
D | sd_adc_modulator.c | 31 struct regulator *vref; member 39 if (priv->vref) in iio_sd_mod_enable() 40 return regulator_enable(priv->vref); in iio_sd_mod_enable() 49 if (priv->vref) in iio_sd_mod_disable() 50 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) != -ENODEV) in iio_sd_mod_probe() 125 return dev_err_probe(dev, PTR_ERR(vref), "Failed to get vref\n"); in iio_sd_mod_probe() [all …]
|
D | rcar-gyroadc.c | 68 struct regulator *vref[8]; member 181 unsigned int vref; in rcar_gyroadc_read_raw() local 189 consumer = priv->vref[0]; in rcar_gyroadc_read_raw() 191 consumer = priv->vref[chan->channel]; in rcar_gyroadc_read_raw() 226 vref = regulator_get_voltage(consumer); in rcar_gyroadc_read_raw() 227 *val = vref / 1000; in rcar_gyroadc_read_raw() 321 struct regulator *vref; in rcar_gyroadc_parse_subdevs() local 393 vref = devm_regulator_get(dev, "vref"); in rcar_gyroadc_parse_subdevs() 395 if (IS_ERR(vref)) { in rcar_gyroadc_parse_subdevs() 398 return PTR_ERR(vref); in rcar_gyroadc_parse_subdevs() [all …]
|
D | lpc18xx_adc.c | 42 struct regulator *vref; member 104 *val = regulator_get_voltage(adc->vref) / 1000; in lpc18xx_adc_read_raw() 124 static void lpc18xx_regulator_disable(void *vref) in lpc18xx_regulator_disable() argument 126 regulator_disable(vref); in lpc18xx_regulator_disable() 154 adc->vref = devm_regulator_get(&pdev->dev, "vref"); in lpc18xx_adc_probe() 155 if (IS_ERR(adc->vref)) in lpc18xx_adc_probe() 156 return dev_err_probe(&pdev->dev, PTR_ERR(adc->vref), in lpc18xx_adc_probe() 165 ret = regulator_enable(adc->vref); in lpc18xx_adc_probe() 171 ret = devm_add_action_or_reset(&pdev->dev, lpc18xx_regulator_disable, adc->vref); in lpc18xx_adc_probe()
|
D | npcm_adc.c | 34 struct regulator *vref; member 174 if (!IS_ERR(info->vref)) { in npcm_adc_read_raw() 175 vref_uv = regulator_get_voltage(info->vref); in npcm_adc_read_raw() 260 info->vref = devm_regulator_get_optional(&pdev->dev, "vref"); in npcm_adc_probe() 261 if (!IS_ERR(info->vref)) { in npcm_adc_probe() 262 ret = regulator_enable(info->vref); in npcm_adc_probe() 275 if (PTR_ERR(info->vref) != -ENODEV) { in npcm_adc_probe() 276 ret = PTR_ERR(info->vref); in npcm_adc_probe() 315 if (!IS_ERR(info->vref)) in npcm_adc_probe() 316 regulator_disable(info->vref); in npcm_adc_probe() [all …]
|
D | max11205.c | 34 struct regulator *vref; member 53 reg_mv = regulator_get_voltage(st->vref); in max11205_read_raw() 127 st->vref = devm_regulator_get(&spi->dev, "vref"); in max11205_probe() 128 if (IS_ERR(st->vref)) in max11205_probe() 129 return dev_err_probe(&spi->dev, PTR_ERR(st->vref), in max11205_probe() 132 ret = regulator_enable(st->vref); in max11205_probe() 136 ret = devm_add_action_or_reset(&spi->dev, max11205_reg_disable, st->vref); in max11205_probe()
|
D | ad799x.c | 128 struct regulator *vref; member 308 if (st->vref) in ad799x_read_raw() 309 ret = regulator_get_voltage(st->vref); in ad799x_read_raw() 814 st->vref = devm_regulator_get_optional(&client->dev, "vref"); in ad799x_probe() 816 if (IS_ERR(st->vref)) { in ad799x_probe() 817 if (PTR_ERR(st->vref) == -ENODEV) { in ad799x_probe() 818 st->vref = NULL; in ad799x_probe() 821 ret = PTR_ERR(st->vref); in ad799x_probe() 826 if (st->vref) { in ad799x_probe() 834 ret = regulator_enable(st->vref); in ad799x_probe() [all …]
|
D | max1241.c | 25 struct regulator *vref; member 94 vref_uV = regulator_get_voltage(adc->vref); in max1241_read_raw() 118 err = regulator_disable(adc->vref); in max1241_disable_vref_action() 143 adc->vref = devm_regulator_get(dev, "vref"); in max1241_probe() 144 if (IS_ERR(adc->vref)) in max1241_probe() 145 return dev_err_probe(dev, PTR_ERR(adc->vref), in max1241_probe() 148 ret = regulator_enable(adc->vref); in max1241_probe()
|
D | ad7949.c | 82 struct regulator *vref; member 239 ret = regulator_get_voltage(ad7949_adc->vref); in ad7949_spi_read_raw() 368 ad7949_adc->vref = devm_regulator_get_optional(dev, "vrefin"); in ad7949_spi_probe() 369 if (IS_ERR(ad7949_adc->vref)) { in ad7949_spi_probe() 370 ret = PTR_ERR(ad7949_adc->vref); in ad7949_spi_probe() 374 ad7949_adc->vref = devm_regulator_get_optional(dev, "vref"); in ad7949_spi_probe() 375 if (IS_ERR(ad7949_adc->vref)) { in ad7949_spi_probe() 376 ret = PTR_ERR(ad7949_adc->vref); in ad7949_spi_probe() 387 ret = regulator_enable(ad7949_adc->vref); in ad7949_spi_probe() 394 ad7949_adc->vref); in ad7949_spi_probe()
|
D | imx93_adc.c | 76 struct regulator *vref; member 259 ret = regulator_get_voltage(adc->vref); in imx93_adc_read_raw() 333 adc->vref = devm_regulator_get(dev, "vref"); in imx93_adc_probe() 334 if (IS_ERR(adc->vref)) in imx93_adc_probe() 335 return dev_err_probe(dev, PTR_ERR(adc->vref), in imx93_adc_probe() 338 ret = regulator_enable(adc->vref); in imx93_adc_probe() 394 regulator_disable(adc->vref); in imx93_adc_probe() 416 regulator_disable(adc->vref); in imx93_adc_remove() 426 regulator_disable(adc->vref); in imx93_adc_runtime_suspend() 437 ret = regulator_enable(adc->vref); in imx93_adc_runtime_resume() [all …]
|
D | fsl-imx25-gcq.c | 42 struct regulator *vref[4]; member 181 if (priv->vref[refp]) in mx25_gcq_ext_regulator_setup() 189 priv->vref[refp] = devm_regulator_get_optional(dev, reg_name); in mx25_gcq_ext_regulator_setup() 190 if (IS_ERR(priv->vref[refp])) in mx25_gcq_ext_regulator_setup() 191 return dev_err_probe(dev, PTR_ERR(priv->vref[refp]), in mx25_gcq_ext_regulator_setup() 242 regulator_get_voltage(priv->vref[refp]); in mx25_gcq_setup_cfgs() 328 if (!priv->vref[i]) in mx25_gcq_probe() 331 ret = regulator_enable(priv->vref[i]); in mx25_gcq_probe() 336 priv->vref[i]); in mx25_gcq_probe()
|
D | imx8qxp-adc.c | 96 struct regulator *vref; member 250 ret = regulator_get_voltage(adc->vref); in imx8qxp_adc_read_raw() 343 adc->vref = devm_regulator_get(dev, "vref"); in imx8qxp_adc_probe() 344 if (IS_ERR(adc->vref)) in imx8qxp_adc_probe() 345 return dev_err_probe(dev, PTR_ERR(adc->vref), "Failed getting reference voltage\n"); in imx8qxp_adc_probe() 347 ret = regulator_enable(adc->vref); in imx8qxp_adc_probe() 402 regulator_disable(adc->vref); in imx8qxp_adc_probe() 421 regulator_disable(adc->vref); in imx8qxp_adc_remove() 436 regulator_disable(adc->vref); in imx8qxp_adc_runtime_suspend() 447 ret = regulator_enable(adc->vref); in imx8qxp_adc_runtime_resume() [all …]
|
D | ad7091r-base.c | 104 if (st->vref) { in ad7091r_read_raw() 105 ret = regulator_get_voltage(st->vref); in ad7091r_read_raw() 292 regulator_disable(st->vref); in ad7091r_remove() 344 st->vref = devm_regulator_get_optional(dev, "vref"); in ad7091r_probe() 345 if (IS_ERR(st->vref)) { in ad7091r_probe() 346 if (PTR_ERR(st->vref) == -EPROBE_DEFER) in ad7091r_probe() 349 st->vref = NULL; in ad7091r_probe() 357 ret = regulator_enable(st->vref); in ad7091r_probe()
|
D | ti-tlc4541.c | 112 int vref; in tlc4541_get_range() local 114 vref = regulator_get_voltage(st->reg); in tlc4541_get_range() 115 if (vref < 0) in tlc4541_get_range() 116 return vref; in tlc4541_get_range() 118 vref /= 1000; in tlc4541_get_range() 120 return vref; in tlc4541_get_range()
|
D | rockchip_saradc.c | 73 struct regulator *vref; member 352 regulator_disable(info->vref); in rockchip_saradc_regulator_disable() 411 regulator_unregister_notifier(info->vref, &info->nb); in rockchip_saradc_regulator_unreg_notifier() 473 info->vref = devm_regulator_get(&pdev->dev, "vref"); in rockchip_saradc_probe() 474 if (IS_ERR(info->vref)) in rockchip_saradc_probe() 475 return dev_err_probe(&pdev->dev, PTR_ERR(info->vref), in rockchip_saradc_probe() 490 ret = regulator_enable(info->vref); in rockchip_saradc_probe() 501 ret = regulator_get_voltage(info->vref); in rockchip_saradc_probe() 532 ret = regulator_register_notifier(info->vref, &info->nb); in rockchip_saradc_probe() 554 regulator_disable(info->vref); in rockchip_saradc_suspend() [all …]
|
D | ad7923.c | 238 int vref; in ad7923_get_range() local 240 vref = regulator_get_voltage(st->reg); in ad7923_get_range() 241 if (vref < 0) in ad7923_get_range() 242 return vref; in ad7923_get_range() 244 vref /= 1000; in ad7923_get_range() 247 vref *= 2; in ad7923_get_range() 249 return vref; in ad7923_get_range()
|
D | imx7d_adc.c | 119 struct regulator *vref; member 321 info->vref_uv = regulator_get_voltage(info->vref); in imx7d_adc_read_raw() 437 ret = regulator_enable(info->vref); in imx7d_adc_enable() 449 regulator_disable(info->vref); in imx7d_adc_enable() 466 regulator_disable(info->vref); in imx7d_adc_disable() 505 info->vref = devm_regulator_get(dev, "vref"); in imx7d_adc_probe() 506 if (IS_ERR(info->vref)) in imx7d_adc_probe() 507 return dev_err_probe(dev, PTR_ERR(info->vref), in imx7d_adc_probe()
|
/linux-6.12.1/drivers/iio/dac/ |
D | dpot-dac.c | 38 struct regulator *vref; member 70 tmp *= regulator_get_voltage(dac->vref) / 1000; in dpot_dac_read_raw() 84 *val *= regulator_get_voltage(dac->vref) / 1000; in dpot_dac_read_raw() 186 dac->vref = devm_regulator_get(dev, "vref"); in dpot_dac_probe() 187 if (IS_ERR(dac->vref)) in dpot_dac_probe() 188 return dev_err_probe(&pdev->dev, PTR_ERR(dac->vref), in dpot_dac_probe() 210 ret = regulator_enable(dac->vref); in dpot_dac_probe() 225 regulator_disable(dac->vref); in dpot_dac_probe() 235 regulator_disable(dac->vref); in dpot_dac_remove()
|
D | lpc18xx_dac.c | 33 struct regulator *vref; member 64 *val = regulator_get_voltage(dac->vref) / 1000; in lpc18xx_dac_read_raw() 127 dac->vref = devm_regulator_get(&pdev->dev, "vref"); in lpc18xx_dac_probe() 128 if (IS_ERR(dac->vref)) in lpc18xx_dac_probe() 129 return dev_err_probe(&pdev->dev, PTR_ERR(dac->vref), in lpc18xx_dac_probe() 138 ret = regulator_enable(dac->vref); in lpc18xx_dac_probe() 164 regulator_disable(dac->vref); in lpc18xx_dac_probe() 177 regulator_disable(dac->vref); in lpc18xx_dac_remove()
|
D | stm32-dac-core.c | 31 struct regulator *vref; member 61 ret = regulator_enable(priv->vref); in stm32_dac_core_hw_start() 76 regulator_disable(priv->vref); in stm32_dac_core_hw_start() 87 regulator_disable(priv->vref); in stm32_dac_core_hw_stop() 121 priv->vref = devm_regulator_get(dev, "vref"); in stm32_dac_probe() 122 if (IS_ERR(priv->vref)) in stm32_dac_probe() 123 return dev_err_probe(dev, PTR_ERR(priv->vref), "vref get failed\n"); in stm32_dac_probe() 133 ret = regulator_get_voltage(priv->vref); in stm32_dac_probe()
|
D | ti-dac7311.c | 49 struct regulator *vref; member 179 ret = regulator_get_voltage(ti_dac->vref); in ti_dac_read_raw() 270 ti_dac->vref = devm_regulator_get(dev, "vref"); in ti_dac_probe() 271 if (IS_ERR(ti_dac->vref)) in ti_dac_probe() 272 return dev_err_probe(dev, PTR_ERR(ti_dac->vref), in ti_dac_probe() 275 ret = regulator_enable(ti_dac->vref); in ti_dac_probe() 293 regulator_disable(ti_dac->vref); in ti_dac_probe() 304 regulator_disable(ti_dac->vref); in ti_dac_remove()
|
D | ti-dac082s085.c | 51 struct regulator *vref; member 200 ret = regulator_get_voltage(ti_dac->vref); in ti_dac_read_raw() 288 ti_dac->vref = devm_regulator_get(dev, "vref"); in ti_dac_probe() 289 if (IS_ERR(ti_dac->vref)) in ti_dac_probe() 290 return PTR_ERR(ti_dac->vref); in ti_dac_probe() 292 ret = regulator_enable(ti_dac->vref); in ti_dac_probe() 312 regulator_disable(ti_dac->vref); in ti_dac_probe() 323 regulator_disable(ti_dac->vref); in ti_dac_remove()
|
D | ti-dac5571.c | 50 struct regulator *vref; member 254 ret = regulator_get_voltage(data->vref); in dac5571_read_raw() 337 data->vref = devm_regulator_get(dev, "vref"); in dac5571_probe() 338 if (IS_ERR(data->vref)) in dac5571_probe() 339 return PTR_ERR(data->vref); in dac5571_probe() 341 ret = regulator_enable(data->vref); in dac5571_probe() 376 regulator_disable(data->vref); in dac5571_probe() 386 regulator_disable(data->vref); in dac5571_remove()
|
/linux-6.12.1/drivers/hwmon/ |
D | adc128d818.c | 61 int vref; /* Reference voltage in mV */ member 157 val = DIV_ROUND_CLOSEST(data->in[index][nr] * data->vref, 4095); in adc128_in_show() 435 int err, vref; in adc128_probe() local 442 vref = devm_regulator_get_enable_read_voltage(dev, "vref"); in adc128_probe() 443 if (vref == -ENODEV) { in adc128_probe() 445 data->vref = 2560; /* 2.56V, in mV */ in adc128_probe() 446 } else if (vref < 0) { in adc128_probe() 447 return vref; in adc128_probe() 450 data->vref = DIV_ROUND_CLOSEST(vref, 1000); in adc128_probe()
|
/linux-6.12.1/drivers/input/touchscreen/ |
D | ads7846.c | 185 #define READ_12BIT_DFR(x, adc, vref) (ADS_START | ADS_A2A1A0_d_ ## x \ argument 187 (adc ? ADS_PD10_ADC_ON : 0) | (vref ? ADS_PD10_REF_ON : 0)) 189 #define READ_Y(vref) (READ_12BIT_DFR(y, 1, vref)) argument 190 #define READ_Z1(vref) (READ_12BIT_DFR(z1, 1, vref)) argument 191 #define READ_Z2(vref) (READ_12BIT_DFR(z2, 1, vref)) argument 192 #define READ_X(vref) (READ_12BIT_DFR(x, 1, vref)) argument 718 static u8 ads7846_get_cmd(enum ads7846_cmds cmd_idx, int vref) in ads7846_get_cmd() argument 722 return READ_Y(vref); in ads7846_get_cmd() 724 return READ_X(vref); in ads7846_get_cmd() 728 return READ_Z1(vref); in ads7846_get_cmd() [all …]
|
/linux-6.12.1/arch/arm64/boot/dts/freescale/ |
D | imx8mq-nitrogen.dts | 61 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-5v";
|