Re: [PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-22 Thread Jonathan Cameron
On 20/04/13 16:38, Alexandre Belloni wrote: Hi Jonathan, Thanks for your review, On 20/04/2013 11:52, Jonathan Cameron wrote: A few bits and pieces inline. Ouch, that interrupt handling is annoyingly complex. Pesky hardware designers... Right, even worse is that on the board we are using,

Re: [PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-22 Thread Maxime Ripard
Hi Alexandre, Le 18/04/2013 17:38, Alexandre Belloni a écrit : > + nau7802_i2c_write(st, NAU7802_REG_PUCTRL, data); > + nau7802_i2c_write(st, NAU7802_REG_ADC_CTRL, 0x30); > + > + if (tmp >= 2400) { > + data = NAU7802_CTRL1_VLDO((4500 - tmp) / 300); > + nau7802_i

Re: [PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-22 Thread Maxime Ripard
Hi Alexandre, Jonathan, Le 20/04/2013 17:38, Alexandre Belloni a écrit : > On 20/04/2013 11:52, Jonathan Cameron wrote: >>> + &iio_dev_attr_gain.dev_attr.attr, >>> + &iio_const_attr_gain_available.dev_attr.attr, >>> + &iio_dev_attr_min_conversions.dev_attr.attr, >> What governs this? Looks

Re: [PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-20 Thread Lars-Peter Clausen
Hi, Some comments on top of what Jonathan said. On 04/18/2013 05:38 PM, Alexandre Belloni wrote: [...] > diff --git a/drivers/iio/adc/nau7802.c b/drivers/iio/adc/nau7802.c > new file mode 100644 > index 000..0148fd8 > --- /dev/null > +++ b/drivers/iio/adc/nau7802.c > @@ -0,0 +1,644 @@ [...]

Re: [PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-20 Thread Alexandre Belloni
Hi Jonathan, Thanks for your review, On 20/04/2013 11:52, Jonathan Cameron wrote: > A few bits and pieces inline. > > Ouch, that interrupt handling is annoyingly complex. Pesky hardware > designers... > Right, even worse is that on the board we are using, the interrupt line is connected to a pc

Re: [PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-20 Thread Jonathan Cameron
On 04/18/2013 04:38 PM, Alexandre Belloni wrote: > The Nuvoton NAU7802 ADC is a 24-bit 2-channels I2C ADC, with adjustable > gain and sampling rates. > > Signed-off-by: Alexandre Belloni > Signed-off-by: Maxime Ripard A few bits and pieces inline. Ouch, that interrupt handling is annoyingly com

[PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-18 Thread Alexandre Belloni
The Nuvoton NAU7802 ADC is a 24-bit 2-channels I2C ADC, with adjustable gain and sampling rates. Signed-off-by: Alexandre Belloni Signed-off-by: Maxime Ripard --- .../bindings/iio/adc/nuvoton-nau7802.txt | 17 + drivers/iio/adc/Kconfig|9 + drivers/ii