iio: allow userspace to flush the hwfifo with non-blocking reads
authorOctavian Purdila <octavian.purdila@intel.com>
Fri, 5 Jun 2015 12:56:47 +0000 (15:56 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 21 Jun 2015 13:51:13 +0000 (14:51 +0100)
commitc6f67a1f55a7f8a8373068ca07553bd2b2731949
tree936323b1e9e9d2ef184f35fc32f5abd459b0572e
parente20008ed931b9bdd90d1a3fd8c9ef9307547f4ed
iio: allow userspace to flush the hwfifo with non-blocking reads

This patch changes the semantics of non-blocking reads so that a
hardware fifo flush is triggered if the available data in the device
buffer is less then the requested size.

This allows userspace to accurately generate hardware fifo flushes, by
doing a non-blocking read with a size greater then the sum of the
device buffer and hardware fifo size.

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>
drivers/iio/industrialio-buffer.c
This page took 0.024453 seconds and 5 git commands to generate.