Lines Matching full:dac

3  * Driver for an envelope detector using a DAC and a comparator
11 * The DAC is used to find the peak level of an alternating voltage input
20 * | dac|-->--|- / |
55 struct iio_channel *dac; member
133 * when that level is "trapped" between two adjacent DAC in envelope_detector_setup_compare()
148 /* Set a "safe" DAC level (if there is such a thing)... */ in envelope_detector_setup_compare()
149 ret = iio_write_channel_raw(env->dac, env->invert ? 0 : env->dac_max); in envelope_detector_setup_compare()
156 /* ...set the real DAC level... */ in envelope_detector_setup_compare()
157 ret = iio_write_channel_raw(env->dac, env->level); in envelope_detector_setup_compare()
202 * in the same range as the DAC and is a value that has not in envelope_detector_read_raw()
220 return iio_read_channel_scale(env->dac, val, val2); in envelope_detector_read_raw()
349 env->dac = devm_iio_channel_get(dev, "dac"); in envelope_detector_probe()
350 if (IS_ERR(env->dac)) in envelope_detector_probe()
351 return dev_err_probe(dev, PTR_ERR(env->dac), in envelope_detector_probe()
352 "failed to get dac input channel\n"); in envelope_detector_probe()
373 ret = iio_get_channel_type(env->dac, &type); in envelope_detector_probe()
378 dev_err(dev, "dac is of the wrong type\n"); in envelope_detector_probe()
382 ret = iio_read_max_channel_raw(env->dac, &env->dac_max); in envelope_detector_probe()
384 dev_err(dev, "dac does not indicate its raw maximum value\n"); in envelope_detector_probe()
406 MODULE_DESCRIPTION("Envelope detector using a DAC and a comparator");