aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation/ABI
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2019-12-11 13:56:15 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-12-29 15:20:09 +0000
commit4538c185680996d7328beac629dbdb7dd3f8f34e (patch)
treee186ecfcd0fd73d506d778549fd8413a706072b9 /Documentation/ABI
parentbindings: iio: pressure: Add documentation for dlh driver (diff)
downloadwireguard-linux-4538c185680996d7328beac629dbdb7dd3f8f34e.tar.xz
wireguard-linux-4538c185680996d7328beac629dbdb7dd3f8f34e.zip
iio: buffer-dmaengine: Report buffer length requirements
The dmaengine buffer has some length alignment requirements that can differ from platform to platform. If the length alignment requirements are not met unexpected behavior like dropping of samples can occur. Currently these requirements are not reported and applications need to know the requirements of the platform by some out-of-band means. Add a new buffer attribute that reports the length alignment requirements called `length_align_bytes`. The reported length alignment is in bytes that means the buffer length alignment in sample sets depends on the number of enabled channels and the bytes per channel. Applications using this attribute to determine the buffer size requirements need to consider this. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'Documentation/ABI')
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-dma-buffer19
1 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-dma-buffer b/Documentation/ABI/testing/sysfs-bus-iio-dma-buffer
new file mode 100644
index 000000000000..d526e6571001
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-dma-buffer
@@ -0,0 +1,19 @@
+What: /sys/bus/iio/devices/iio:deviceX/buffer/length_align_bytes
+KernelVersion: 5.4
+Contact: linux-iio@vger.kernel.org
+Description:
+ DMA buffers tend to have a alignment requirement for the
+ buffers. If this alignment requirement is not met samples might
+ be dropped from the buffer.
+
+ This property reports the alignment requirements in bytes.
+ This means that the buffer size in bytes needs to be a integer
+ multiple of the number reported by this file.
+
+ The alignment requirements in number of sample sets will depend
+ on the enabled channels and the bytes per channel. This means
+ that the alignment requirement in samples sets might change
+ depending on which and how many channels are enabled. Whereas
+ the alignment requirement reported in bytes by this property
+ will remain static and does not depend on which channels are
+ enabled.