iio: add watermark logic to iio read and poll
authorJosselin Costanzi <josselin.costanzi@mobile-devices.fr>
Sun, 22 Mar 2015 18:33:38 +0000 (20:33 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 29 Mar 2015 15:17:09 +0000 (16:17 +0100)
Currently the IIO buffer blocking read only wait until at least one
data element is available.
This patch makes the reader sleep until enough data is collected before
returning to userspace. This should limit the read() calls count when
trying to get data in batches.

Co-author: Yannick Bedhomme <yannick.bedhomme@mobile-devices.fr>
Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr>
[rebased and remove buffer timeout]
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Documentation/ABI/testing/sysfs-bus-iio
drivers/iio/industrialio-buffer.c
drivers/iio/kfifo_buf.c
drivers/staging/iio/accel/sca3000_ring.c
include/linux/iio/buffer.h

Simple merge
Simple merge
Simple merge