iio: buffer: Expose data available
authorMatt Fornero <matt.fornero@mathworks.com>
Wed, 6 Dec 2017 19:43:30 +0000 (14:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:03:41 +0000 (16:03 +0100)
commit350f6c75f6933d5d58548d68f9336543c56b4a02
tree056a75fe99ad2653d510bc2892574f5e6e1d3c70
parent80e3f0103e126060721d96074ec6c1d252af23b9
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 <matt.fornero@mathworks.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-bus-iio
drivers/iio/industrialio-buffer.c