Re: [RFC PATCH] one-bit-adc-dac: Add initial version of one bit ADC, DAC

2020-07-26 Thread Jonathan Cameron
.. > > > > > > + if (ret < 0) > > > > + return ret; > > > > + > > > > + for (i = 0; i < num_ch; i++) { > > > > + channels[i] = (struct > > iio_chan_spec)ONE_BIT_ADC_DAC_CHANNEL(i + > > > > + offset,

RE: [RFC PATCH] one-bit-adc-dac: Add initial version of one bit ADC, DAC

2020-07-24 Thread Pop, Cristian
> -Original Message- > From: Jonathan Cameron > Sent: Monday, July 20, 2020 4:52 PM > To: Lars-Peter Clausen > Cc: Pop, Cristian ; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: Re: [RFC PATCH] one-bit-adc-dac: Add initial version

Re: [RFC PATCH] one-bit-adc-dac: Add initial version of one bit ADC, DAC

2020-07-21 Thread Andy Shevchenko
On Thu, Jul 16, 2020 at 10:27 AM Cristian Pop wrote: > > Implementation for 1-bit ADC (comparator) and a 1-bit DAC (switch) ... > +struct one_bit_adc_dac_state { > + struct platform_device *pdev; Wouldn't 'struct device *dev;' be enough? > + struct gpio_descs *in_gpio_descs

Re: [RFC PATCH] one-bit-adc-dac: Add initial version of one bit ADC, DAC

2020-07-20 Thread Jonathan Cameron
On Thu, 16 Jul 2020 11:25:36 +0200 Lars-Peter Clausen wrote: > On 7/16/20 9:27 AM, Cristian Pop wrote: > > Implementation for 1-bit ADC (comparator) and a 1-bit DAC (switch) > > Very sneaky way of introducing a iio-gpio-proxy driver to be able to > access GPIOs through libiio ;). I'm not real

Re: [RFC PATCH] one-bit-adc-dac: Add initial version of one bit ADC, DAC

2020-07-16 Thread Lars-Peter Clausen
On 7/16/20 9:27 AM, Cristian Pop wrote: Implementation for 1-bit ADC (comparator) and a 1-bit DAC (switch) Very sneaky way of introducing a iio-gpio-proxy driver to be able to access GPIOs through libiio ;). I'm not really a fan of the whole idea. But either way I think this needs a better d