Lines Matching defs:vref
62 int vref; /* Reference voltage in mV */
158 val = DIV_ROUND_CLOSEST(data->in[index][nr] * data->vref, 4095);
410 /* If external vref is selected, configure the chip to use it */
436 int err, vref;
442 /* vref is optional. If specified, is used as chip reference voltage */
443 regulator = devm_regulator_get_optional(dev, "vref");
449 vref = regulator_get_voltage(regulator);
450 if (vref < 0) {
451 err = vref;
454 data->vref = DIV_ROUND_CLOSEST(vref, 1000);
456 data->vref = 2560; /* 2.56V, in mV */