Commit df2e8f78 authored by Jonathan Cameron's avatar Jonathan Cameron

staging:iio: drop sw_ring buffer implementation.

Whilst this is IIO's oldest buffer implementation it is messy, poorly
implemented and whilst it works, no one is entirely sure it always will.

New IIO drivers have not been using this for some time and now all remaining
old users have been converted to use the kfifo based alternative.

Clearly a fifo isn't the same as a ring buffer but in many use cases it
really doesn't matter.  We also loose the watershed based poll implementation.
However having poll effectively report data only when the buffer was half
full was at best an 'unusual' use of the interface.

At somepoint in the future we may bring watersheds back on a different
buffer implementation, but then we will think a lot more about how to do
the interface first.
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 94f3c7cd
......@@ -12,19 +12,6 @@ config IIO_ST_HWMON
map allows IIO devices to provide basic hwmon functionality
for those channels specified in the map.
if IIO_BUFFER
config IIO_SW_RING
select IIO_TRIGGER
tristate "Industrial I/O lock free software ring"
help
Example software ring buffer implementation. The design aim
of this particular realization was to minimize write locking
with the intention that some devices would be able to write
in interrupt context.
endif # IIO_BUFFER
source "drivers/staging/iio/accel/Kconfig"
source "drivers/staging/iio/adc/Kconfig"
source "drivers/staging/iio/addac/Kconfig"
......
......@@ -2,8 +2,6 @@
# Makefile for the industrial I/O core.
#
obj-$(CONFIG_IIO_SW_RING) += ring_sw.o
obj-$(CONFIG_IIO_SIMPLE_DUMMY) += iio_dummy.o
iio_dummy-y := iio_simple_dummy.o
iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_EVENTS) += iio_simple_dummy_events.o
......
This diff is collapsed.
/* The industrial I/O simple minimally locked ring buffer.
*
* Copyright (c) 2008 Jonathan Cameron
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*
* This code is deliberately kept separate from the main industrialio I/O core
* as it is intended that in the future a number of different software ring
* buffer implementations will exist with different characteristics to suit
* different applications.
*
* This particular one was designed for a data capture application where it was
* particularly important that no userspace reads would interrupt the capture
* process. To this end the ring is not locked during a read.
*
* Comments on this buffer design welcomed. It's far from efficient and some of
* my understanding of the effects of scheduling on this are somewhat limited.
* Frankly, to my mind, this is the current weak point in the industrial I/O
* patch set.
*/
#ifndef _IIO_RING_SW_H_
#define _IIO_RING_SW_H_
#include <linux/iio/buffer.h>
struct iio_buffer *iio_sw_rb_allocate(struct iio_dev *indio_dev);
void iio_sw_rb_free(struct iio_buffer *ring);
#endif /* _IIO_RING_SW_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment