]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: add IIO_DECLARE_QUATERNION() macro
authorDavid Lechner <dlechner@baylibre.com>
Sat, 28 Feb 2026 20:02:22 +0000 (14:02 -0600)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 2 Mar 2026 20:52:21 +0000 (20:52 +0000)
commit56bd57e7b161f75535df91b229b0b2c64c6e5581
tree6ef53d8239ac1905867b815e18650f72deb44dc3
parent36f6d4db3c5cb0f58fb02b1f54f9e86522d2f918
iio: add IIO_DECLARE_QUATERNION() macro

Add a new IIO_DECLARE_QUATERNION() macro that is used to declare the
field in an IIO buffer struct that contains a quaternion vector.

Quaternions are currently the only IIO data type that uses the .repeat
feature of struct iio_scan_type. This has an implicit rule that the
element in the buffer must be aligned to the entire size of the repeated
element. This macro will make that requirement explicit. Since this is
the only user, we just call the macro IIO_DECLARE_QUATERNION() instead
of something more generic.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
include/linux/iio/iio.h