Skip to contentSkip to conversation

staging:iio:ad799x: Move ring functions to the main file

PATCH Applied Lars-Peter Clausen 3 participants 6 messages Mar 10, 2014 – Mar 15, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging:iio:ad799x: Move ring functions to the main file

The ad799x_ring.c file is pretty much only one function these days. No need to keep it in a separate file. Since there is then only one user of the header left also move everything from the header to the main file.

---
 drivers/staging/iio/adc/Kconfig       |  13 +--
 drivers/staging/iio/adc/Makefile      |   1 -
 drivers/staging/iio/adc/ad799x.h      | 121 ----------------------------
 drivers/staging/iio/adc/ad799x_core.c | 145 +++++++++++++++++++++++++++++++++-
 drivers/staging/iio/adc/ad799x_ring.c |  84 --------------------
 5 files changed, 143 insertions(+), 221 deletions(-)
 delete mode 100644 drivers/staging/iio/adc/ad799x.h
 delete mode 100644 drivers/staging/iio/adc/ad799x_ring.c
drivers/staging/iio/adc/Kconfig +2 -11
index 3633298..ed23cceb 100644
@@ -40,23 +40,14 @@ config AD7606_IFACE_SPI
 config AD799X
 	tristate "Analog Devices AD799x ADC driver"
 	depends on I2C
-	select IIO_TRIGGER if IIO_BUFFER
-	select AD799X_RING_BUFFER
+	select IIO_BUFFER
+	select IIO_TRIGGERED_BUFFER
 	help
 	  Say yes here to build support for Analog Devices:
 	  ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997, ad7998
 	  i2c analog to digital converters (ADC). Provides direct access
 	  via sysfs.
 
-config AD799X_RING_BUFFER
-	bool "Analog Devices AD799x: use ring buffer"
-	depends on AD799X
-	select IIO_BUFFER
-	select IIO_TRIGGERED_BUFFER
-	help
-	  Say yes here to include ring buffer support in the AD799X
-	  ADC driver.
-
 config AD7780
 	tristate "Analog Devices AD7780 and similar ADCs driver"
 	depends on SPI
drivers/staging/iio/adc/Makefile +0 -1
index 3e9fb14..b2d35f8 100644
@@ -9,7 +9,6 @@ ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
 obj-$(CONFIG_AD7606) += ad7606.o
 
 ad799x-y := ad799x_core.o
-ad799x-$(CONFIG_AD799X_RING_BUFFER) += ad799x_ring.o
 obj-$(CONFIG_AD799X) += ad799x.o
 
 obj-$(CONFIG_AD7291) += ad7291.o
drivers/staging/iio/adc/ad799x.h deleted +0 -121

121 lines not on this page · raw message

drivers/staging/iio/adc/ad799x_core.c +141 -4

170 lines not on this page · raw message

drivers/staging/iio/adc/ad799x_ring.c deleted +0 -84

84 lines not on this page · raw message

Signature · 1 line
1.8.0
#1 lore raw

PATCH 2/2 staging:iio: Move ad799x driver out of staging

The driver is now at a reasonable quality level. Move it out of staging.

---
 drivers/iio/adc/Kconfig                                     | 11 +++++++++++
 drivers/iio/adc/Makefile                                    |  1 +
 drivers/{staging/iio/adc/ad799x_core.c => iio/adc/ad799x.c} |  0
 drivers/staging/iio/adc/Kconfig                             | 11 -----------
 drivers/staging/iio/adc/Makefile                            |  3 ---
 5 files changed, 12 insertions(+), 14 deletions(-)
 rename drivers/{staging/iio/adc/ad799x_core.c => iio/adc/ad799x.c} (100%)
drivers/iio/adc/Kconfig +11 -0
index 5553206..a036811 100644
@@ -96,6 +96,17 @@ config AD7923
 	  To compile this driver as a module, choose M here: the
 	  module will be called ad7923.
 
+config AD799X
+	tristate "Analog Devices AD799x ADC driver"
+	depends on I2C
+	select IIO_BUFFER
+	select IIO_TRIGGERED_BUFFER
+	help
+	  Say yes here to build support for Analog Devices:
+	  ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997, ad7998
+	  i2c analog to digital converters (ADC). Provides direct access
+	  via sysfs.
+
 config AT91_ADC
 	tristate "Atmel AT91 ADC"
 	depends on ARCH_AT91
drivers/iio/adc/Makefile +1 -0
index 89f1216..1e2fc891 100644
@@ -11,6 +11,7 @@ obj-$(CONFIG_AD7476) += ad7476.o
 obj-$(CONFIG_AD7791) += ad7791.o
 obj-$(CONFIG_AD7793) += ad7793.o
 obj-$(CONFIG_AD7887) += ad7887.o
+obj-$(CONFIG_AD799X) += ad799x.o
 obj-$(CONFIG_AT91_ADC) += at91_adc.o
 obj-$(CONFIG_EXYNOS_ADC) += exynos_adc.o
 obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o
drivers/iio/adc/ad799x.c renamed from drivers/staging/iio/adc/ad799x_core.c +0 -0
similarity index 100%
rename from drivers/staging/iio/adc/ad799x_core.c
rename to drivers/iio/adc/ad799x.c
drivers/staging/iio/adc/Kconfig +0 -11
index ed23cceb..b87e382 100644
@@ -37,17 +37,6 @@ config AD7606_IFACE_SPI
 	  Say yes here to include parallel interface support on the AD7606
 	  ADC driver.
 
-config AD799X
-	tristate "Analog Devices AD799x ADC driver"
-	depends on I2C
-	select IIO_BUFFER
-	select IIO_TRIGGERED_BUFFER
-	help
-	  Say yes here to build support for Analog Devices:
-	  ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997, ad7998
-	  i2c analog to digital converters (ADC). Provides direct access
-	  via sysfs.
-
 config AD7780
 	tristate "Analog Devices AD7780 and similar ADCs driver"
 	depends on SPI
drivers/staging/iio/adc/Makefile +0 -3
index b2d35f8..afdcd1f 100644
@@ -8,9 +8,6 @@ ad7606-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
 ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
 obj-$(CONFIG_AD7606) += ad7606.o
 
-ad799x-y := ad799x_core.o
-obj-$(CONFIG_AD799X) += ad799x.o
-
 obj-$(CONFIG_AD7291) += ad7291.o
 obj-$(CONFIG_AD7780) += ad7780.o
 obj-$(CONFIG_AD7816) += ad7816.o
Signature · 1 line
1.8.0
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] staging:iio: Move ad799x driver out of staging

Quoted 13 lines · Lars-Peter Clausen

The driver is now at a reasonable quality level. Move it out of staging.

---
 drivers/iio/adc/Kconfig                                     | 11 +++++++++++
 drivers/iio/adc/Makefile                                    |  1 +
 drivers/{staging/iio/adc/ad799x_core.c => iio/adc/ad799x.c} |  0
 drivers/staging/iio/adc/Kconfig                             | 11 -----------
 drivers/staging/iio/adc/Makefile                            |  3 ---
 5 files changed, 12 insertions(+), 14 deletions(-)
 rename drivers/{staging/iio/adc/ad799x_core.c => iio/adc/ad799x.c} (100%)
maintainer Applied
#3 lore raw

Re: [PATCH 2/2] staging:iio: Move ad799x driver out of staging

Quoted 14 lines · Hartmut Knaack
Quoted 13 lines · Lars-Peter Clausen

The driver is now at a reasonable quality level. Move it out of staging.

---
  drivers/iio/adc/Kconfig                                     | 11 +++++++++++
  drivers/iio/adc/Makefile                                    |  1 +
  drivers/{staging/iio/adc/ad799x_core.c => iio/adc/ad799x.c} |  0
  drivers/staging/iio/adc/Kconfig                             | 11 -----------
  drivers/staging/iio/adc/Makefile                            |  3 ---
  5 files changed, 12 insertions(+), 14 deletions(-)

rename drivers/{staging/iio/adc/ad799x_core.c => iio/adc/ad799x.c} (100%)

Quoted 2 lines

Applied to the togreg branch of iio.git
As ever it'll go out first as testing for autobuilders to play football with it.

Acked-by on v1 1/2
#4 lore raw
In reply to Lars-Peter Clausen
Quoted 5 lines · Lars-Peter Clausen

The ad799x_ring.c file is pretty much only one function these days. No need to keep it in a separate file. Since there is then only one user of the header left also move everything from the header to the main file.

Quoted 11 lines
---
 drivers/staging/iio/adc/Kconfig       |  13 +--
 drivers/staging/iio/adc/Makefile      |   1 -
 drivers/staging/iio/adc/ad799x.h      | 121 ----------------------------
 drivers/staging/iio/adc/ad799x_core.c | 145 +++++++++++++++++++++++++++++++++-
 drivers/staging/iio/adc/ad799x_ring.c |  84 --------------------
 5 files changed, 143 insertions(+), 221 deletions(-)
 delete mode 100644 drivers/staging/iio/adc/ad799x.h
 delete mode 100644 drivers/staging/iio/adc/ad799x_ring.c
maintainer Applied
#5 lore raw
Quoted 17 lines · Hartmut Knaack
Quoted 12 lines · Lars-Peter Clausen

The ad799x_ring.c file is pretty much only one function these days. No need to keep it in a separate file. Since there is then only one user of the header left also move everything from the header to the main file.

---
  drivers/staging/iio/adc/Kconfig       |  13 +--
  drivers/staging/iio/adc/Makefile      |   1 -
  drivers/staging/iio/adc/ad799x.h      | 121 ----------------------------
  drivers/staging/iio/adc/ad799x_core.c | 145 +++++++++++++++++++++++++++++++++-
  drivers/staging/iio/adc/ad799x_ring.c |  84 --------------------
  5 files changed, 143 insertions(+), 221 deletions(-)
Quoted 4 lines

delete mode 100644 drivers/staging/iio/adc/ad799x.h delete mode 100644 drivers/staging/iio/adc/ad799x_ring.c

Quoted 1 line

Small point Hartmut, but if adding an ack, put it just below the last sign off etc above. Makes it harder for me to miss ;)

Applied to the togreg branch of iio.git

Thanks and keep up the good work. I'll start pesting Lars about drivers I think he is being too fussy about ;)

Quoted 1 line