Skip to content

Commit 415f792

Browse files
cristina2689jic23
authored andcommitted
iio: Move IIO Dummy Driver out of staging
This patch moves the reference IIO dummy driver from drivers/staging/iio into a separate folder, drivers/iio/dummy and adds the proper Kconfig and Makefile for it. A new config menu entry called IIO dummy driver has also been added in the Industrial I/O support menu, corresponding to this driver. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent f0b1643 commit 415f792

File tree

12 files changed

+79
-32
lines changed

12 files changed

+79
-32
lines changed

drivers/iio/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ source "drivers/iio/amplifiers/Kconfig"
5050
source "drivers/iio/chemical/Kconfig"
5151
source "drivers/iio/common/Kconfig"
5252
source "drivers/iio/dac/Kconfig"
53+
source "drivers/iio/dummy/Kconfig"
5354
source "drivers/iio/frequency/Kconfig"
5455
source "drivers/iio/gyro/Kconfig"
5556
source "drivers/iio/humidity/Kconfig"

drivers/iio/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ obj-y += buffer/
1616
obj-y += chemical/
1717
obj-y += common/
1818
obj-y += dac/
19+
obj-y += dummy/
1920
obj-y += gyro/
2021
obj-y += frequency/
2122
obj-y += humidity/

drivers/iio/dummy/Kconfig

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#
2+
# Industrial I/O subsystem Dummy Driver configuration
3+
#
4+
menu "IIO dummy driver"
5+
depends on IIO
6+
7+
config IIO_DUMMY_EVGEN
8+
tristate
9+
10+
config IIO_SIMPLE_DUMMY
11+
tristate "An example driver with no hardware requirements"
12+
help
13+
Driver intended mainly as documentation for how to write
14+
a driver. May also be useful for testing userspace code
15+
without hardware.
16+
17+
if IIO_SIMPLE_DUMMY
18+
19+
config IIO_SIMPLE_DUMMY_EVENTS
20+
bool "Event generation support"
21+
select IIO_DUMMY_EVGEN
22+
help
23+
Add some dummy events to the simple dummy driver.
24+
25+
config IIO_SIMPLE_DUMMY_BUFFER
26+
bool "Buffered capture support"
27+
select IIO_BUFFER
28+
select IIO_TRIGGER
29+
select IIO_KFIFO_BUF
30+
help
31+
Add buffered data capture to the simple dummy driver.
32+
33+
endif # IIO_SIMPLE_DUMMY
34+
35+
endmenu

drivers/iio/dummy/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Makefile for the IIO Dummy Driver
3+
#
4+
5+
obj-$(CONFIG_IIO_SIMPLE_DUMMY) += iio_dummy.o
6+
iio_dummy-y := iio_simple_dummy.o
7+
iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_EVENTS) += iio_simple_dummy_events.o
8+
iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_BUFFER) += iio_simple_dummy_buffer.o
9+
10+
obj-$(CONFIG_IIO_DUMMY_EVGEN) += iio_dummy_evgen.o

drivers/staging/iio/Kconfig

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,32 @@ source "drivers/staging/iio/meter/Kconfig"
1717
source "drivers/staging/iio/resolver/Kconfig"
1818
source "drivers/staging/iio/trigger/Kconfig"
1919

20-
config IIO_DUMMY_EVGEN
21-
tristate
22-
23-
config IIO_SIMPLE_DUMMY
24-
tristate "An example driver with no hardware requirements"
25-
help
26-
Driver intended mainly as documentation for how to write
27-
a driver. May also be useful for testing userspace code
28-
without hardware.
29-
30-
if IIO_SIMPLE_DUMMY
31-
32-
config IIO_SIMPLE_DUMMY_EVENTS
33-
bool "Event generation support"
34-
select IIO_DUMMY_EVGEN
35-
help
36-
Add some dummy events to the simple dummy driver.
37-
38-
config IIO_SIMPLE_DUMMY_BUFFER
39-
bool "Buffered capture support"
40-
select IIO_BUFFER
41-
select IIO_TRIGGER
42-
select IIO_KFIFO_BUF
43-
help
44-
Add buffered data capture to the simple dummy driver.
45-
46-
endif # IIO_SIMPLE_DUMMY
20+
#config IIO_DUMMY_EVGEN
21+
# tristate
22+
#
23+
#config IIO_SIMPLE_DUMMY
24+
# tristate "An example driver with no hardware requirements"
25+
# help
26+
# Driver intended mainly as documentation for how to write
27+
# a driver. May also be useful for testing userspace code
28+
# without hardware.
29+
30+
#if IIO_SIMPLE_DUMMY
31+
32+
#config IIO_SIMPLE_DUMMY_EVENTS
33+
# bool "Event generation support"
34+
# select IIO_DUMMY_EVGEN
35+
# help
36+
# Add some dummy events to the simple dummy driver.
37+
38+
#config IIO_SIMPLE_DUMMY_BUFFER
39+
# bool "Buffered capture support"
40+
# select IIO_BUFFER
41+
# select IIO_TRIGGER
42+
# select IIO_KFIFO_BUF
43+
# help
44+
# Add buffered data capture to the simple dummy driver.
45+
46+
#endif # IIO_SIMPLE_DUMMY
4747

4848
endmenu

drivers/staging/iio/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# Makefile for the industrial I/O core.
33
#
44

5-
obj-$(CONFIG_IIO_SIMPLE_DUMMY) += iio_dummy.o
6-
iio_dummy-y := iio_simple_dummy.o
7-
iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_EVENTS) += iio_simple_dummy_events.o
8-
iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_BUFFER) += iio_simple_dummy_buffer.o
5+
#obj-$(CONFIG_IIO_SIMPLE_DUMMY) += iio_dummy.o
6+
#iio_dummy-y := iio_simple_dummy.o
7+
#iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_EVENTS) += iio_simple_dummy_events.o
8+
#iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_BUFFER) += iio_simple_dummy_buffer.o
99

10-
obj-$(CONFIG_IIO_DUMMY_EVGEN) += iio_dummy_evgen.o
10+
#obj-$(CONFIG_IIO_DUMMY_EVGEN) += iio_dummy_evgen.o
1111

1212
obj-y += accel/
1313
obj-y += adc/

0 commit comments

Comments
 (0)