Re: [PATCH v4 1/2] staging: iio: ad7606: Move out of staging
On Mon, 10 Dec 2018 13:03:33 +0200 Stefan Popa wrote: > Move ad7606 ADC driver out of staging and into the mainline. > > Signed-off-by: Stefan Popa Hi Stefan, I've been a bit silly here and only been looking at the 'new code' and assuming this was a straight copy. Please could you split the patch up to do the changes in place like a normal cleanup series and only move it in a final patch at the end. Sorry I didn't mention this before, but it's much easier to verify the changes that way. The code is fine, but we need the baby steps towards an identical file in staging that we then move out. I only noticed in the end (despite your big change log :( because it doesn't actually apply cleanly so I was wondering what has changed. Thanks, Jonathan. > --- > Changes in v2: > - Simplified the Kconfig menu. > - Added SPDX-License-Identifier. > - Ordered the includes alphabetically. > - Used a threaded interrupt. > - Replaced ad7606_poll_bh_to_ring() with ad7606_trigger_handler(). > - Used a trigger. > - Replaced wait_event_interruptible() with > wait_for_completion_timeout(). > - Replaced wake_up_interruptible() with complete(). > - Used devm_iio_triggered_buffer_setup(). > - Added buffer_ops. > - Used single line comments where needed. > - Removed the gap between docs and struct. > - Added ad7606_of_match[]. > Changes in v3: > - Added a comment which offers more information of the way the interrupt > is triggered. > - Fixed the way a new conversion is triggered. > - endianness = IIO_CPU > - Removed unnecessary mutex locks. > - Removed the buffer_postdisable ops and replaced it with > buffer_predisable. > - Added a devm_add_action_or_reset() which deals with > regulator_disable(). > - Misc style fixes. > Changes in v4: > - Removed unused fields from the ad7606_state struct. > - Used the find_closest() macro when searching for the available scale > and the oversampling ratios. > > MAINTAINERS | 7 + > drivers/iio/adc/Kconfig | 28 ++ > drivers/iio/adc/Makefile | 3 + > drivers/iio/adc/ad7606.c | 588 > +++ > drivers/iio/adc/ad7606.h | 99 ++ > drivers/iio/adc/ad7606_par.c | 105 +++ > drivers/iio/adc/ad7606_spi.c | 82 + > drivers/staging/iio/adc/Kconfig | 34 -- > drivers/staging/iio/adc/Makefile | 3 - > drivers/staging/iio/adc/ad7606.c | 565 - > drivers/staging/iio/adc/ad7606.h | 106 --- > drivers/staging/iio/adc/ad7606_par.c | 113 --- > drivers/staging/iio/adc/ad7606_spi.c | 79 - > 13 files changed, 912 insertions(+), 900 deletions(-) > create mode 100644 drivers/iio/adc/ad7606.c > create mode 100644 drivers/iio/adc/ad7606.h > create mode 100644 drivers/iio/adc/ad7606_par.c > create mode 100644 drivers/iio/adc/ad7606_spi.c > delete mode 100644 drivers/staging/iio/adc/ad7606.c > delete mode 100644 drivers/staging/iio/adc/ad7606.h > delete mode 100644 drivers/staging/iio/adc/ad7606_par.c > delete mode 100644 drivers/staging/iio/adc/ad7606_spi.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index f642044..843545d 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -839,6 +839,13 @@ S: Supported > F: drivers/iio/dac/ad5758.c > F: Documentation/devicetree/bindings/iio/dac/ad5758.txt > > +ANALOG DEVICES INC AD7606 DRIVER > +M: Stefan Popa > +L: linux-...@vger.kernel.org > +W: http://ez.analog.com/community/linux-device-drivers > +S: Supported > +F: drivers/iio/adc/ad7606.c > + > ANALOG DEVICES INC AD9389B DRIVER > M: Hans Verkuil > L: linux-me...@vger.kernel.org > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig > index a52fea8..c3f61c9 100644 > --- a/drivers/iio/adc/Kconfig > +++ b/drivers/iio/adc/Kconfig > @@ -58,6 +58,34 @@ config AD7476 > To compile this driver as a module, choose M here: the > module will be called ad7476. > > +config AD7606 > + tristate > + depends on GPIOLIB || COMPILE_TEST > + depends on HAS_IOMEM > + select IIO_BUFFER > + select IIO_TRIGGERED_BUFFER > + > +config AD7606_IFACE_PARALLEL > + tristate "Analog Devices AD7606 ADC driver with parallel interface > support" > + select AD7606 > + help > + Say yes here to build parallel interface support for Analog Devices: > + ad7605-4, ad7606, ad7606-6, ad7606-4 analog to digital converters > (ADC). > + > + To compile this driver as a module, choose M here: the > + module will be called ad7606_parallel. > + > +config AD7606_IFACE_SPI > + tristate "Analog Devices AD7606 ADC driver with spi interface support" > + depends on SPI > + select AD7606 > + help > + Say yes here to build spi interface support for Analog Devices: > +
Re: [PATCH v4 1/2] staging: iio: ad7606: Move out of staging
On Mon, 10 Dec 2018 13:03:33 +0200 Stefan Popa wrote: > Move ad7606 ADC driver out of staging and into the mainline. > > Signed-off-by: Stefan Popa Looks good to me. I'll let it sit for a few days though to give time for a final review from anyone else who wants to and for Rob to take a final look at the bindings if he wants to. Thanks, Jonathan > --- > Changes in v2: > - Simplified the Kconfig menu. > - Added SPDX-License-Identifier. > - Ordered the includes alphabetically. > - Used a threaded interrupt. > - Replaced ad7606_poll_bh_to_ring() with ad7606_trigger_handler(). > - Used a trigger. > - Replaced wait_event_interruptible() with > wait_for_completion_timeout(). > - Replaced wake_up_interruptible() with complete(). > - Used devm_iio_triggered_buffer_setup(). > - Added buffer_ops. > - Used single line comments where needed. > - Removed the gap between docs and struct. > - Added ad7606_of_match[]. > Changes in v3: > - Added a comment which offers more information of the way the interrupt > is triggered. > - Fixed the way a new conversion is triggered. > - endianness = IIO_CPU > - Removed unnecessary mutex locks. > - Removed the buffer_postdisable ops and replaced it with > buffer_predisable. > - Added a devm_add_action_or_reset() which deals with > regulator_disable(). > - Misc style fixes. > Changes in v4: > - Removed unused fields from the ad7606_state struct. > - Used the find_closest() macro when searching for the available scale > and the oversampling ratios. > > MAINTAINERS | 7 + > drivers/iio/adc/Kconfig | 28 ++ > drivers/iio/adc/Makefile | 3 + > drivers/iio/adc/ad7606.c | 588 > +++ > drivers/iio/adc/ad7606.h | 99 ++ > drivers/iio/adc/ad7606_par.c | 105 +++ > drivers/iio/adc/ad7606_spi.c | 82 + > drivers/staging/iio/adc/Kconfig | 34 -- > drivers/staging/iio/adc/Makefile | 3 - > drivers/staging/iio/adc/ad7606.c | 565 - > drivers/staging/iio/adc/ad7606.h | 106 --- > drivers/staging/iio/adc/ad7606_par.c | 113 --- > drivers/staging/iio/adc/ad7606_spi.c | 79 - > 13 files changed, 912 insertions(+), 900 deletions(-) > create mode 100644 drivers/iio/adc/ad7606.c > create mode 100644 drivers/iio/adc/ad7606.h > create mode 100644 drivers/iio/adc/ad7606_par.c > create mode 100644 drivers/iio/adc/ad7606_spi.c > delete mode 100644 drivers/staging/iio/adc/ad7606.c > delete mode 100644 drivers/staging/iio/adc/ad7606.h > delete mode 100644 drivers/staging/iio/adc/ad7606_par.c > delete mode 100644 drivers/staging/iio/adc/ad7606_spi.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index f642044..843545d 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -839,6 +839,13 @@ S: Supported > F: drivers/iio/dac/ad5758.c > F: Documentation/devicetree/bindings/iio/dac/ad5758.txt > > +ANALOG DEVICES INC AD7606 DRIVER > +M: Stefan Popa > +L: linux-...@vger.kernel.org > +W: http://ez.analog.com/community/linux-device-drivers > +S: Supported > +F: drivers/iio/adc/ad7606.c > + > ANALOG DEVICES INC AD9389B DRIVER > M: Hans Verkuil > L: linux-me...@vger.kernel.org > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig > index a52fea8..c3f61c9 100644 > --- a/drivers/iio/adc/Kconfig > +++ b/drivers/iio/adc/Kconfig > @@ -58,6 +58,34 @@ config AD7476 > To compile this driver as a module, choose M here: the > module will be called ad7476. > > +config AD7606 > + tristate > + depends on GPIOLIB || COMPILE_TEST > + depends on HAS_IOMEM > + select IIO_BUFFER > + select IIO_TRIGGERED_BUFFER > + > +config AD7606_IFACE_PARALLEL > + tristate "Analog Devices AD7606 ADC driver with parallel interface > support" > + select AD7606 > + help > + Say yes here to build parallel interface support for Analog Devices: > + ad7605-4, ad7606, ad7606-6, ad7606-4 analog to digital converters > (ADC). > + > + To compile this driver as a module, choose M here: the > + module will be called ad7606_parallel. > + > +config AD7606_IFACE_SPI > + tristate "Analog Devices AD7606 ADC driver with spi interface support" > + depends on SPI > + select AD7606 > + help > + Say yes here to build spi interface support for Analog Devices: > + ad7605-4, ad7606, ad7606-6, ad7606-4 analog to digital converters > (ADC). > + > + To compile this driver as a module, choose M here: the > + module will be called ad7606_spi. > + > config AD7766 > tristate "Analog Devices AD7766/AD7767 ADC driver" > depends on SPI_MASTER > diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile > index a6e6a0b..b734f4f 100644 > ---
[PATCH v4 1/2] staging: iio: ad7606: Move out of staging
Move ad7606 ADC driver out of staging and into the mainline. Signed-off-by: Stefan Popa --- Changes in v2: - Simplified the Kconfig menu. - Added SPDX-License-Identifier. - Ordered the includes alphabetically. - Used a threaded interrupt. - Replaced ad7606_poll_bh_to_ring() with ad7606_trigger_handler(). - Used a trigger. - Replaced wait_event_interruptible() with wait_for_completion_timeout(). - Replaced wake_up_interruptible() with complete(). - Used devm_iio_triggered_buffer_setup(). - Added buffer_ops. - Used single line comments where needed. - Removed the gap between docs and struct. - Added ad7606_of_match[]. Changes in v3: - Added a comment which offers more information of the way the interrupt is triggered. - Fixed the way a new conversion is triggered. - endianness = IIO_CPU - Removed unnecessary mutex locks. - Removed the buffer_postdisable ops and replaced it with buffer_predisable. - Added a devm_add_action_or_reset() which deals with regulator_disable(). - Misc style fixes. Changes in v4: - Removed unused fields from the ad7606_state struct. - Used the find_closest() macro when searching for the available scale and the oversampling ratios. MAINTAINERS | 7 + drivers/iio/adc/Kconfig | 28 ++ drivers/iio/adc/Makefile | 3 + drivers/iio/adc/ad7606.c | 588 +++ drivers/iio/adc/ad7606.h | 99 ++ drivers/iio/adc/ad7606_par.c | 105 +++ drivers/iio/adc/ad7606_spi.c | 82 + drivers/staging/iio/adc/Kconfig | 34 -- drivers/staging/iio/adc/Makefile | 3 - drivers/staging/iio/adc/ad7606.c | 565 - drivers/staging/iio/adc/ad7606.h | 106 --- drivers/staging/iio/adc/ad7606_par.c | 113 --- drivers/staging/iio/adc/ad7606_spi.c | 79 - 13 files changed, 912 insertions(+), 900 deletions(-) create mode 100644 drivers/iio/adc/ad7606.c create mode 100644 drivers/iio/adc/ad7606.h create mode 100644 drivers/iio/adc/ad7606_par.c create mode 100644 drivers/iio/adc/ad7606_spi.c delete mode 100644 drivers/staging/iio/adc/ad7606.c delete mode 100644 drivers/staging/iio/adc/ad7606.h delete mode 100644 drivers/staging/iio/adc/ad7606_par.c delete mode 100644 drivers/staging/iio/adc/ad7606_spi.c diff --git a/MAINTAINERS b/MAINTAINERS index f642044..843545d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -839,6 +839,13 @@ S: Supported F: drivers/iio/dac/ad5758.c F: Documentation/devicetree/bindings/iio/dac/ad5758.txt +ANALOG DEVICES INC AD7606 DRIVER +M: Stefan Popa +L: linux-...@vger.kernel.org +W: http://ez.analog.com/community/linux-device-drivers +S: Supported +F: drivers/iio/adc/ad7606.c + ANALOG DEVICES INC AD9389B DRIVER M: Hans Verkuil L: linux-me...@vger.kernel.org diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index a52fea8..c3f61c9 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -58,6 +58,34 @@ config AD7476 To compile this driver as a module, choose M here: the module will be called ad7476. +config AD7606 + tristate + depends on GPIOLIB || COMPILE_TEST + depends on HAS_IOMEM + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + +config AD7606_IFACE_PARALLEL + tristate "Analog Devices AD7606 ADC driver with parallel interface support" + select AD7606 + help + Say yes here to build parallel interface support for Analog Devices: + ad7605-4, ad7606, ad7606-6, ad7606-4 analog to digital converters (ADC). + + To compile this driver as a module, choose M here: the + module will be called ad7606_parallel. + +config AD7606_IFACE_SPI + tristate "Analog Devices AD7606 ADC driver with spi interface support" + depends on SPI + select AD7606 + help + Say yes here to build spi interface support for Analog Devices: + ad7605-4, ad7606, ad7606-6, ad7606-4 analog to digital converters (ADC). + + To compile this driver as a module, choose M here: the + module will be called ad7606_spi. + config AD7766 tristate "Analog Devices AD7766/AD7767 ADC driver" depends on SPI_MASTER diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile index a6e6a0b..b734f4f 100644 --- a/drivers/iio/adc/Makefile +++ b/drivers/iio/adc/Makefile @@ -8,6 +8,9 @@ obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o obj-$(CONFIG_AD7266) += ad7266.o obj-$(CONFIG_AD7291) += ad7291.o obj-$(CONFIG_AD7298) += ad7298.o +obj-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o +obj-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o +obj-$(CONFIG_AD7606) += ad7606.o obj-$(CONFIG_AD7923) += ad7923.o