Browse Source

iio: Move generic buffer implementations to sub-directory

For generic IIO trigger implementations we already have a sub-directory,
but the generic buffer implementations currently reside in the IIO
top-level directory. The main reason is that things have historically grown
into this form.

With more generic buffer implementations on its way now is the perfect time
to clean this up and introduce a sub-directory for generic buffer
implementations to avoid too much clutter in the top-level directory.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen 10 years ago
parent
commit
8548a63b37

+ 1 - 1
Documentation/DocBook/iio.tmpl

@@ -578,7 +578,7 @@
     work together.
     work together.
     </para>
     </para>
     <sect2 id="iiotrigbufsetup"> <title> IIO triggered buffer setup</title>
     <sect2 id="iiotrigbufsetup"> <title> IIO triggered buffer setup</title>
-!Edrivers/iio/industrialio-triggered-buffer.c
+!Edrivers/iio/buffer/industrialio-triggered-buffer.c
 !Finclude/linux/iio/iio.h iio_buffer_setup_ops
 !Finclude/linux/iio/iio.h iio_buffer_setup_ops
 
 
 
 

+ 1 - 21
drivers/iio/Kconfig

@@ -19,27 +19,7 @@ config IIO_BUFFER
 	  acquisition methods.
 	  acquisition methods.
 
 
 if IIO_BUFFER
 if IIO_BUFFER
-
-config IIO_BUFFER_CB
-	tristate "IIO callback buffer used for push in-kernel interfaces"
-	help
-	  Should be selected by any drivers that do in-kernel push
-	  usage.  That is, those where the data is pushed to the consumer.
-
-config IIO_KFIFO_BUF
-	tristate "Industrial I/O buffering based on kfifo"
-	help
-	  A simple fifo based on kfifo.  Note that this currently provides
-	  no buffer events so it is up to userspace to work out how
-	  often to read from the buffer.
-
-config IIO_TRIGGERED_BUFFER
-	tristate
-	select IIO_TRIGGER
-	select IIO_KFIFO_BUF
-	help
-	  Provides helper functions for setting up triggered buffers.
-
+	source "drivers/iio/buffer/Kconfig"
 endif # IIO_BUFFER
 endif # IIO_BUFFER
 
 
 config IIO_TRIGGER
 config IIO_TRIGGER

+ 1 - 4
drivers/iio/Makefile

@@ -7,13 +7,10 @@ industrialio-y := industrialio-core.o industrialio-event.o inkern.o
 industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
 industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
 industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o
 industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o
 
 
-obj-$(CONFIG_IIO_BUFFER_CB) += industrialio-buffer-cb.o
-obj-$(CONFIG_IIO_TRIGGERED_BUFFER) += industrialio-triggered-buffer.o
-obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o
-
 obj-y += accel/
 obj-y += accel/
 obj-y += adc/
 obj-y += adc/
 obj-y += amplifiers/
 obj-y += amplifiers/
+obj-y += buffer/
 obj-y += common/
 obj-y += common/
 obj-y += dac/
 obj-y += dac/
 obj-y += gyro/
 obj-y += gyro/

+ 24 - 0
drivers/iio/buffer/Kconfig

@@ -0,0 +1,24 @@
+#
+# Industrial I/O generic buffer implementations
+#
+# When adding new entries keep the list in alphabetical order
+
+config IIO_BUFFER_CB
+	tristate "IIO callback buffer used for push in-kernel interfaces"
+	help
+	  Should be selected by any drivers that do in-kernel push
+	  usage.  That is, those where the data is pushed to the consumer.
+
+config IIO_KFIFO_BUF
+	tristate "Industrial I/O buffering based on kfifo"
+	help
+	  A simple fifo based on kfifo.  Note that this currently provides
+	  no buffer events so it is up to userspace to work out how
+	  often to read from the buffer.
+
+config IIO_TRIGGERED_BUFFER
+	tristate
+	select IIO_TRIGGER
+	select IIO_KFIFO_BUF
+	help
+	  Provides helper functions for setting up triggered buffers.

+ 8 - 0
drivers/iio/buffer/Makefile

@@ -0,0 +1,8 @@
+#
+# Makefile for the industrial I/O buffer implementations
+#
+
+# When adding new entries keep the list in alphabetical order
+obj-$(CONFIG_IIO_BUFFER_CB) += industrialio-buffer-cb.o
+obj-$(CONFIG_IIO_TRIGGERED_BUFFER) += industrialio-triggered-buffer.o
+obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o

+ 0 - 0
drivers/iio/industrialio-buffer-cb.c → drivers/iio/buffer/industrialio-buffer-cb.c


+ 0 - 0
drivers/iio/industrialio-triggered-buffer.c → drivers/iio/buffer/industrialio-triggered-buffer.c


+ 0 - 0
drivers/iio/kfifo_buf.c → drivers/iio/buffer/kfifo_buf.c