aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI
diff options
context:
space:
mode:
authorJosselin Costanzi <josselin.costanzi@mobile-devices.fr>2015-03-22 14:33:38 -0400
committerJonathan Cameron <jic23@kernel.org>2015-03-29 11:17:09 -0400
commit37d3455672732b29a477732a94abfe95e199f0ce (patch)
treea2e4920bbecaec6f3773cbc5a7228d17283b7d21 /Documentation/ABI
parent9444a300c2be3ce6266462e3171ceb6636cc62e8 (diff)
iio: add watermark logic to iio read and poll
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>
Diffstat (limited to 'Documentation/ABI')
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio15
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 580b3f85437b..0b6f0abf3370 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1280,3 +1280,18 @@ Contact: linux-iio@vger.kernel.org
1280Description: 1280Description:
1281 Specifies number of seconds in which we compute the steps 1281 Specifies number of seconds in which we compute the steps
1282 that occur in order to decide if the consumer is making steps. 1282 that occur in order to decide if the consumer is making steps.
1283
1284What: /sys/bus/iio/devices/iio:deviceX/buffer/watermark
1285KernelVersion: 4.2
1286Contact: linux-iio@vger.kernel.org
1287Description:
1288 A single positive integer specifying the maximum number of scan
1289 elements to wait for.
1290 Poll will block until the watermark is reached.
1291 Blocking read will wait until the minimum between the requested
1292 read amount or the low water mark is available.
1293 Non-blocking read will retrieve the available samples from the
1294 buffer even if there are less samples then watermark level. This
1295 allows the application to block on poll with a timeout and read
1296 the available samples after the timeout expires and thus have a
1297 maximum delay guarantee.