Lines Matching refs:vref
73 struct regulator *vref; member
277 if (adc->vref) { in mcp3911_calc_scale_table()
278 ret = regulator_get_voltage(adc->vref); in mcp3911_calc_scale_table()
411 if (adc->vref) { in mcp3911_config()
445 static void mcp3911_cleanup_regulator(void *vref) in mcp3911_cleanup_regulator() argument
447 regulator_disable(vref); in mcp3911_cleanup_regulator()
480 adc->vref = devm_regulator_get_optional(&adc->spi->dev, "vref"); in mcp3911_probe()
481 if (IS_ERR(adc->vref)) { in mcp3911_probe()
482 if (PTR_ERR(adc->vref) == -ENODEV) { in mcp3911_probe()
483 adc->vref = NULL; in mcp3911_probe()
487 PTR_ERR(adc->vref)); in mcp3911_probe()
488 return PTR_ERR(adc->vref); in mcp3911_probe()
492 ret = regulator_enable(adc->vref); in mcp3911_probe()
497 mcp3911_cleanup_regulator, adc->vref); in mcp3911_probe()