From 03af03ad7c6723e0f87568e4ffe66ceb9608bfe7 Mon Sep 17 00:00:00 2001 From: Karol Wrona Date: Wed, 7 Jan 2015 19:36:11 +0100 Subject: iio: Add new operating mode for non triggered sw buffers There was a need for non triggered software buffer type. It can be used when triggered model does not fit and INDIO_BUFFER_HARDWARE causes confusion because the data stream can be obtained not directly form hardware backend. Suggested-by: Jonathan Cameron Signed-off-by: Karol Wrona Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- drivers/iio/industrialio-buffer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/iio') diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index 403b72878b0b..71333140d42c 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -639,6 +639,8 @@ static int __iio_update_buffers(struct iio_dev *indio_dev, indio_dev->currentmode = INDIO_BUFFER_TRIGGERED; } else if (indio_dev->modes & INDIO_BUFFER_HARDWARE) { indio_dev->currentmode = INDIO_BUFFER_HARDWARE; + } else if (indio_dev->modes & INDIO_BUFFER_SOFTWARE) { + indio_dev->currentmode = INDIO_BUFFER_SOFTWARE; } else { /* Should never be reached */ ret = -EINVAL; goto error_run_postdisable; -- cgit v1.2.3