Lines Matching refs:vref_reg
64 struct regulator *vref_reg; member
293 st->vref_reg = devm_regulator_get_optional(&st->spi->dev, "vref"); in ad5761_get_vref()
294 if (PTR_ERR(st->vref_reg) == -ENODEV) { in ad5761_get_vref()
307 if (IS_ERR(st->vref_reg)) { in ad5761_get_vref()
310 return PTR_ERR(st->vref_reg); in ad5761_get_vref()
313 ret = regulator_enable(st->vref_reg); in ad5761_get_vref()
320 ret = regulator_get_voltage(st->vref_reg); in ad5761_get_vref()
340 regulator_disable(st->vref_reg); in ad5761_get_vref()
341 st->vref_reg = NULL; in ad5761_get_vref()
388 if (!IS_ERR_OR_NULL(st->vref_reg)) in ad5761_probe()
389 regulator_disable(st->vref_reg); in ad5761_probe()
401 if (!IS_ERR_OR_NULL(st->vref_reg)) in ad5761_remove()
402 regulator_disable(st->vref_reg); in ad5761_remove()