Skip to content

Commit

Permalink
staging:iio:Documentation Simple dummy driver to explain the basics
Browse files Browse the repository at this point in the history
The documenation explaining how to go about writing a driver is lagging
horribly, so here is another approach; an actual driver with
lots of explanatory comments.

Note it is currently minimal in that there are no events and no
buffer.  With care they can probably be added in additional files
without messing up the clarity of what we have here.

V2: Addressed some of Manuel Stahl's feedback.

Fixed up kernel doc.
Added more general description.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Oct 17, 2011
1 parent 9c95e01 commit 3a84331
Show file tree
Hide file tree
Showing 3 changed files with 491 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/staging/iio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,12 @@ source "drivers/staging/iio/meter/Kconfig"
source "drivers/staging/iio/resolver/Kconfig"
source "drivers/staging/iio/trigger/Kconfig"

config IIO_SIMPLE_DUMMY
tristate "An example driver with no hardware requirements"
help
Driver intended mainly as documentation for how to write
a driver. May also be useful for testing userspace code
without hardward.


endif # IIO
2 changes: 2 additions & 0 deletions drivers/staging/iio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o
obj-$(CONFIG_IIO_SW_RING) += ring_sw.o
obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o

obj-$(CONFIG_IIO_SIMPLE_DUMMY) += iio_simple_dummy.o

obj-y += accel/
obj-y += adc/
obj-y += addac/
Expand Down
Loading

0 comments on commit 3a84331

Please sign in to comment.