Skip to content

Commit

Permalink
Staging: IIO: Ring buffer: Initial pass at rarely locked ring buffer
Browse files Browse the repository at this point in the history
Please note this ring buffer implementation is very much a
work in progress (and hence RFC).  In it's current form
it is stable and reasonably efficient.  There are a couple
of unlikely cases that will lead to more data being lost
that is strictly necessary. The target was for the case
of requiring regular sampling even during user space reads.

All comments welcome.

The intention is to make this only one of several
implementations with run time selection.  For now there
is only one, so it is hard coded into the drivers using it.

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 Sep 15, 2009
1 parent 1637db4 commit 2235acb
Show file tree
Hide file tree
Showing 4 changed files with 636 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/staging/iio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ config IIO_RING_BUFFER
Provide core support for various ring buffer based data
acquisition methods.

if IIO_RING_BUFFER

config IIO_SW_RING
tristate "Industrial I/O lock free software ring"
help
example software ring buffer implementation. The design aim
of this particular realization was to minize write locking
with the intention that some devices would be able to write
in interrupt context.

endif # IIO_RINGBUFFER

config IIO_TRIGGER
boolean "Enable triggered sampling support"
help
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/iio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ industrialio-y := industrialio-core.o
industrialio-$(CONFIG_IIO_RING_BUFFER) += industrialio-ring.o
industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o

obj-$(CONFIG_IIO_SW_RING) += ring_sw.o

obj-y += accel/
obj-y += adc/
obj-y += light/
Loading

0 comments on commit 2235acb

Please sign in to comment.