Re: [PATCH 2/4] iio: dpot-dac: DAC driver based on a digital potentiometer

2016-10-22 Thread Jonathan Cameron
On 20/10/16 10:26, Peter Rosin wrote: > It is assumed the that the dpot is used as a voltage divider between the > current dpot wiper setting and the maximum resistance of the dpot. The > divided voltage is provided by a vref regulator. > > .--. >.---. | | >

Re: [PATCH 2/4] iio: dpot-dac: DAC driver based on a digital potentiometer

2016-10-20 Thread Peter Rosin
On 2016-10-20 16:08, Peter Meerwald-Stadler wrote: + u32 max_ohms; +}; + +static const struct iio_chan_spec dpot_dac_iio_channel = { + .type = IIO_VOLTAGE, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) + | BIT(IIO_CHAN_INFO_SCALE), +

Re: [PATCH 2/4] iio: dpot-dac: DAC driver based on a digital potentiometer

2016-10-20 Thread Peter Rosin
On 2016-10-20 13:29, Peter Meerwald-Stadler wrote: >> It is assumed the that the dpot is used as a voltage divider between the >> current dpot wiper setting and the maximum resistance of the dpot. The >> divided voltage is provided by a vref regulator. >> >> .--. >>.--

Re: [PATCH 2/4] iio: dpot-dac: DAC driver based on a digital potentiometer

2016-10-20 Thread Peter Meerwald-Stadler
> >> +struct dpot_dac { > >> + struct regulator *vref; > >> + struct iio_channel *dpot; > > > > const > > const? devm_iio_channel_get doesn't return a const iio_channel. What > am I missing? ah, I mixed this up with iio_chan_spec > >> + u32 max_ohms; > >> +}; > >> + > >> +static const stru

Re: [PATCH 2/4] iio: dpot-dac: DAC driver based on a digital potentiometer

2016-10-20 Thread Peter Meerwald-Stadler
> It is assumed the that the dpot is used as a voltage divider between the > current dpot wiper setting and the maximum resistance of the dpot. The > divided voltage is provided by a vref regulator. > > .--. >.---. | | >| Vref |--'.---. >|

[PATCH 2/4] iio: dpot-dac: DAC driver based on a digital potentiometer

2016-10-20 Thread Peter Rosin
It is assumed the that the dpot is used as a voltage divider between the current dpot wiper setting and the maximum resistance of the dpot. The divided voltage is provided by a vref regulator. .--. .---. | | | Vref |--'.---. | regulator |--.