]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: Replace 'sign' field with union in struct iio_scan_type
authorFrancesco Lavra <flavra@baylibre.com>
Tue, 24 Mar 2026 08:47:40 +0000 (09:47 +0100)
committerJonathan Cameron <jic23@kernel.org>
Mon, 27 Apr 2026 08:58:16 +0000 (09:58 +0100)
commitfda05af070e7bc0403a487fc87378d2e1323f529
tree7fac94fe6d7c328b080d56623960edd6fc537be9
parent7216b9f7e9fe34a1623cceee920caede8929078e
iio: Replace 'sign' field with union in struct iio_scan_type

This field is used to differentiate between signed and unsigned integers.
A following commit will extend its use in order to add support for non-
integer scan elements; therefore, replace it with a union that contains a
more generic 'format' field. This union will be dropped when all drivers
are changed to use the format field.
Opportunistically replace character literals with symbolic constants that
represent the set of allowed values for the format field.

Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/driver-api/iio/buffers.rst
include/linux/iio/iio.h