diff options
author | Karol Wrona <k.wrona@samsung.com> | 2015-01-07 13:36:11 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-01-25 17:53:38 -0500 |
commit | 03af03ad7c6723e0f87568e4ffe66ceb9608bfe7 (patch) | |
tree | 201889e95ec97cbeceac1dbc243395aa9db425e4 /drivers/iio | |
parent | ab80496a813aefafd0e33619b8b6c061a4d5c3f4 (diff) |
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 <jic23@kernel.org>
Signed-off-by: Karol Wrona <k.wrona@samsung.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/industrialio-buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
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, | |||
639 | indio_dev->currentmode = INDIO_BUFFER_TRIGGERED; | 639 | indio_dev->currentmode = INDIO_BUFFER_TRIGGERED; |
640 | } else if (indio_dev->modes & INDIO_BUFFER_HARDWARE) { | 640 | } else if (indio_dev->modes & INDIO_BUFFER_HARDWARE) { |
641 | indio_dev->currentmode = INDIO_BUFFER_HARDWARE; | 641 | indio_dev->currentmode = INDIO_BUFFER_HARDWARE; |
642 | } else if (indio_dev->modes & INDIO_BUFFER_SOFTWARE) { | ||
643 | indio_dev->currentmode = INDIO_BUFFER_SOFTWARE; | ||
642 | } else { /* Should never be reached */ | 644 | } else { /* Should never be reached */ |
643 | ret = -EINVAL; | 645 | ret = -EINVAL; |
644 | goto error_run_postdisable; | 646 | goto error_run_postdisable; |