iio: make IIO_DMA_MINALIGN minimum of 8 bytes
authorDavid Lechner <dlechner@baylibre.com>
Wed, 7 May 2025 20:42:40 +0000 (15:42 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:31 +0000 (14:20 +0100)
commitfa19c303254bae5b8d105ecdc7d714d092f2adda
tree42cf5a2de112f882f61c78166f4a5bc39d1013a5
parent666eae6c6dab46cb5023170651286c47a693f661
iio: make IIO_DMA_MINALIGN minimum of 8 bytes

Add a condition to ensure that IIO_DMA_MINALIGN is at least 8 bytes.
On some 32-bit architectures, IIO_DMA_MINALIGN is 4. In many cases,
drivers are using this alignment for buffers that include a 64-bit
timestamp that is used with iio_push_to_buffers_with_ts(), which expects
the timestamp to be aligned to 8 bytes. To handle this, we can just make
IIO_DMA_MINALIGN at least 8 bytes.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-1-4aee1b9f1b89@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
include/linux/iio/iio.h