Lines Matching refs:vref
73 struct regulator *vref;
277 if (adc->vref) {
278 ret = regulator_get_voltage(adc->vref);
281 "failed to get vref voltage: %d\n",
411 if (adc->vref) {
445 static void mcp3911_cleanup_regulator(void *vref)
447 regulator_disable(vref);
480 adc->vref = devm_regulator_get_optional(&adc->spi->dev, "vref");
481 if (IS_ERR(adc->vref)) {
482 if (PTR_ERR(adc->vref) == -ENODEV) {
483 adc->vref = NULL;
487 PTR_ERR(adc->vref));
488 return PTR_ERR(adc->vref);
492 ret = regulator_enable(adc->vref);
497 mcp3911_cleanup_regulator, adc->vref);