Skip to content

Commit 9d0be85

Browse files
committed
iio:adc:ti_am335x_adc Fix buffered mode by identifying as software buffer.
Whilst this part has a hardware buffer, the identifcation that IIO cares about is the userspace facing end. It this case we push individual elements from the hardware fifo into the software interface (specifically a kfifo) rather than providing direct reads through to a hardware buffer (as we still do in the sca3000 for example). Technically the original specification as a hardware buffer could be considered wrong, but it didn't matter until the patch listed below. Result is that any attempt to enable the buffer will return -EINVAL Fixes: 225d59a ("iio: Specify supported modes for buffers") Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent fa34e6d commit 9d0be85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/ti_am335x_adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static int tiadc_iio_buffered_hardware_setup(struct iio_dev *indio_dev,
289289
goto error_kfifo_free;
290290

291291
indio_dev->setup_ops = setup_ops;
292-
indio_dev->modes |= INDIO_BUFFER_HARDWARE;
292+
indio_dev->modes |= INDIO_BUFFER_SOFTWARE;
293293

294294
return 0;
295295

0 commit comments

Comments
 (0)