iio: Specify supported modes for buffers
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 29 May 2015 16:14:21 +0000 (18:14 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 1 Jun 2015 10:31:12 +0000 (11:31 +0100)
commit225d59adf1c899176cce0fc80e42b1d1c12f109f
treeb308359c7f30aa5b542bae15a956d91edf7b987a
parent629bc02331f7aae6ef775fb4c15e6d8aa58722f1
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>
drivers/iio/buffer_cb.c
drivers/iio/industrialio-buffer.c
drivers/iio/kfifo_buf.c
drivers/staging/iio/accel/sca3000_ring.c
include/linux/iio/buffer.h