Lines Matching full:dpot
11 * It is assumed that the dpot is used as a voltage divider between the
12 * current dpot wiper setting and the maximum resistance of the dpot. The
39 struct iio_channel *dpot; member
62 return iio_read_channel_raw(dac->dpot, val); in dpot_dac_read_raw()
65 ret = iio_read_channel_scale(dac->dpot, val, val2); in dpot_dac_read_raw()
105 return iio_read_avail_channel_raw(dac->dpot, vals, length); in dpot_dac_read_avail()
119 return iio_write_channel_raw(dac->dpot, val); in dpot_dac_write_raw()
141 ret = iio_read_max_channel_raw(dac->dpot, &max); in dpot_dac_channel_max_ohms()
143 dev_err(dev, "dpot does not indicate its raw maximum value\n"); in dpot_dac_channel_max_ohms()
147 switch (iio_read_channel_scale(dac->dpot, &val, &val2)) { in dpot_dac_channel_max_ohms()
159 dev_err(dev, "dpot has a scale that is too weird\n"); in dpot_dac_channel_max_ohms()
191 dac->dpot = devm_iio_channel_get(dev, "dpot"); in dpot_dac_probe()
192 if (IS_ERR(dac->dpot)) in dpot_dac_probe()
193 return dev_err_probe(&pdev->dev, PTR_ERR(dac->dpot), in dpot_dac_probe()
194 "failed to get dpot input channel\n"); in dpot_dac_probe()
196 ret = iio_get_channel_type(dac->dpot, &type); in dpot_dac_probe()
201 dev_err(dev, "dpot is of the wrong type\n"); in dpot_dac_probe()
241 { .compatible = "dpot-dac" },
250 .name = "iio-dpot-dac",