aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-08-14 10:54:55 -0400
committerJonathan Cameron <jic23@kernel.org>2015-08-16 05:51:21 -0400
commit8548a63b37be4891e7972ba058b785d9468e8907 (patch)
tree30abebcbaeee81baa4d49c673f7dc89b950031df
parent050ee2f16e245b42c9ba30640bb91b309b424c48 (diff)
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>
-rw-r--r--Documentation/DocBook/iio.tmpl2
-rw-r--r--drivers/iio/Kconfig22
-rw-r--r--drivers/iio/Makefile5
-rw-r--r--drivers/iio/buffer/Kconfig24
-rw-r--r--drivers/iio/buffer/Makefile8
-rw-r--r--drivers/iio/buffer/industrialio-buffer-cb.c (renamed from drivers/iio/industrialio-buffer-cb.c)0
-rw-r--r--drivers/iio/buffer/industrialio-triggered-buffer.c (renamed from drivers/iio/industrialio-triggered-buffer.c)0
-rw-r--r--drivers/iio/buffer/kfifo_buf.c (renamed from drivers/iio/kfifo_buf.c)0
8 files changed, 35 insertions, 26 deletions
diff --git a/Documentation/DocBook/iio.tmpl b/Documentation/DocBook/iio.tmpl
index 06bb53de5a47..98be322673da 100644
--- a/Documentation/DocBook/iio.tmpl
+++ b/Documentation/DocBook/iio.tmpl
@@ -578,7 +578,7 @@
578 work together. 578 work together.
579 </para> 579 </para>
580 <sect2 id="iiotrigbufsetup"> <title> IIO triggered buffer setup</title> 580 <sect2 id="iiotrigbufsetup"> <title> IIO triggered buffer setup</title>
581!Edrivers/iio/industrialio-triggered-buffer.c 581!Edrivers/iio/buffer/industrialio-triggered-buffer.c
582!Finclude/linux/iio/iio.h iio_buffer_setup_ops 582!Finclude/linux/iio/iio.h iio_buffer_setup_ops
583 583
584 584
diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
index b52c8a3b1360..3c6c6e28a60a 100644
--- a/drivers/iio/Kconfig
+++ b/drivers/iio/Kconfig
@@ -19,27 +19,7 @@ config IIO_BUFFER
19 acquisition methods. 19 acquisition methods.
20 20
21if IIO_BUFFER 21if IIO_BUFFER
22 22 source "drivers/iio/buffer/Kconfig"
23config IIO_BUFFER_CB
24 tristate "IIO callback buffer used for push in-kernel interfaces"
25 help
26 Should be selected by any drivers that do in-kernel push
27 usage. That is, those where the data is pushed to the consumer.
28
29config IIO_KFIFO_BUF
30 tristate "Industrial I/O buffering based on kfifo"
31 help
32 A simple fifo based on kfifo. Note that this currently provides
33 no buffer events so it is up to userspace to work out how
34 often to read from the buffer.
35
36config IIO_TRIGGERED_BUFFER
37 tristate
38 select IIO_TRIGGER
39 select IIO_KFIFO_BUF
40 help
41 Provides helper functions for setting up triggered buffers.
42
43endif # IIO_BUFFER 23endif # IIO_BUFFER
44 24
45config IIO_TRIGGER 25config IIO_TRIGGER
diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
index 09d8ec5d57d8..7ddb988338ec 100644
--- a/drivers/iio/Makefile
+++ b/drivers/iio/Makefile
@@ -7,13 +7,10 @@ industrialio-y := industrialio-core.o industrialio-event.o inkern.o
7industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o 7industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
8industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o 8industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o
9 9
10obj-$(CONFIG_IIO_BUFFER_CB) += industrialio-buffer-cb.o
11obj-$(CONFIG_IIO_TRIGGERED_BUFFER) += industrialio-triggered-buffer.o
12obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o
13
14obj-y += accel/ 10obj-y += accel/
15obj-y += adc/ 11obj-y += adc/
16obj-y += amplifiers/ 12obj-y += amplifiers/
13obj-y += buffer/
17obj-y += common/ 14obj-y += common/
18obj-y += dac/ 15obj-y += dac/
19obj-y += gyro/ 16obj-y += gyro/
diff --git a/drivers/iio/buffer/Kconfig b/drivers/iio/buffer/Kconfig
new file mode 100644
index 000000000000..0a7b2fd3699b
--- /dev/null
+++ b/drivers/iio/buffer/Kconfig
@@ -0,0 +1,24 @@
1#
2# Industrial I/O generic buffer implementations
3#
4# When adding new entries keep the list in alphabetical order
5
6config IIO_BUFFER_CB
7 tristate "IIO callback buffer used for push in-kernel interfaces"
8 help
9 Should be selected by any drivers that do in-kernel push
10 usage. That is, those where the data is pushed to the consumer.
11
12config IIO_KFIFO_BUF
13 tristate "Industrial I/O buffering based on kfifo"
14 help
15 A simple fifo based on kfifo. Note that this currently provides
16 no buffer events so it is up to userspace to work out how
17 often to read from the buffer.
18
19config IIO_TRIGGERED_BUFFER
20 tristate
21 select IIO_TRIGGER
22 select IIO_KFIFO_BUF
23 help
24 Provides helper functions for setting up triggered buffers.
diff --git a/drivers/iio/buffer/Makefile b/drivers/iio/buffer/Makefile
new file mode 100644
index 000000000000..4d193b9a9123
--- /dev/null
+++ b/drivers/iio/buffer/Makefile
@@ -0,0 +1,8 @@
1#
2# Makefile for the industrial I/O buffer implementations
3#
4
5# When adding new entries keep the list in alphabetical order
6obj-$(CONFIG_IIO_BUFFER_CB) += industrialio-buffer-cb.o
7obj-$(CONFIG_IIO_TRIGGERED_BUFFER) += industrialio-triggered-buffer.o
8obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o
diff --git a/drivers/iio/industrialio-buffer-cb.c b/drivers/iio/buffer/industrialio-buffer-cb.c
index 323079c3ccce..323079c3ccce 100644
--- a/drivers/iio/industrialio-buffer-cb.c
+++ b/drivers/iio/buffer/industrialio-buffer-cb.c
diff --git a/drivers/iio/industrialio-triggered-buffer.c b/drivers/iio/buffer/industrialio-triggered-buffer.c
index 4b2858ba1fd6..4b2858ba1fd6 100644
--- a/drivers/iio/industrialio-triggered-buffer.c
+++ b/drivers/iio/buffer/industrialio-triggered-buffer.c
diff --git a/drivers/iio/kfifo_buf.c b/drivers/iio/buffer/kfifo_buf.c
index c5b999f0c519..c5b999f0c519 100644
--- a/drivers/iio/kfifo_buf.c
+++ b/drivers/iio/buffer/kfifo_buf.c