mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Karol Wrona <[email protected]> Reviewed-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
ab80496a81
commit
03af03ad7c
2 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue