From 350f6c75f6933d5d58548d68f9336543c56b4a02 Mon Sep 17 00:00:00 2001 From: Matt Fornero Date: Wed, 6 Dec 2017 14:43:30 -0500 Subject: iio: buffer: Expose data available Add a sysfs attribute that exposes buffer data available to userspace. This attribute can be checked at runtime to determine the overall buffer fill level (across all allocated buffers). Signed-off-by: Matt Fornero Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- Documentation/ABI/testing/sysfs-bus-iio | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Documentation/ABI/testing/sysfs-bus-iio') diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index a478740e2783..9cc0ea1c0273 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1413,6 +1413,16 @@ Description: the available samples after the timeout expires and thus have a maximum delay guarantee. +What: /sys/bus/iio/devices/iio:deviceX/buffer/data_available +KernelVersion: 4.16 +Contact: linux-iio@vger.kernel.org +Description: + A read-only value indicating the bytes of data available in the + buffer. In the case of an output buffer, this indicates the + amount of empty space available to write data to. In the case of + an input buffer, this indicates the amount of data available for + reading. + What: /sys/bus/iio/devices/iio:deviceX/buffer/hwfifo_enabled KernelVersion: 4.2 Contact: linux-iio@vger.kernel.org -- cgit