summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/accel/sca3000_ring.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-05-29 18:14:21 +0200
committerJonathan Cameron <jic23@kernel.org>2015-06-01 11:31:12 +0100
commit225d59adf1c899176cce0fc80e42b1d1c12f109f (patch)
treeb308359c7f30aa5b542bae15a956d91edf7b987a /drivers/staging/iio/accel/sca3000_ring.c
parent629bc02331f7aae6ef775fb4c15e6d8aa58722f1 (diff)
iio: Specify supported modes for buffers
For each buffer type specify the supported device modes for this buffer. This allows us for devices which support multiple different operating modes to pick the correct operating mode based on the modes supported by the attached buffers. It also prevents that buffers with conflicting modes are attached to a device at the same time or that a buffer with a non-supported mode is attached to a device (e.g. in-kernel callback buffer to a device only supporting hardware mode). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/accel/sca3000_ring.c')
-rw-r--r--drivers/staging/iio/accel/sca3000_ring.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c
index 8589eade1057..23685e74917e 100644
--- a/drivers/staging/iio/accel/sca3000_ring.c
+++ b/drivers/staging/iio/accel/sca3000_ring.c
@@ -258,6 +258,8 @@ static const struct iio_buffer_access_funcs sca3000_ring_access_funcs = {
.read_first_n = &sca3000_read_first_n_hw_rb,
.data_available = sca3000_ring_buf_data_available,
.release = sca3000_ring_release,
+
+ .modes = INDIO_BUFFER_HARDWARE,
};
int sca3000_configure_ring(struct iio_dev *indio_dev)