diff options
| author | Francesco Lavra <flavra@baylibre.com> | 2026-03-24 09:47:53 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-04-27 09:58:16 +0100 |
| commit | b29f00ef08a7afdedc0b36cc0bead579d6977ced (patch) | |
| tree | 9fa59462cbb97cb5ba523c2097da779d37b28b62 /include/linux/iio | |
| parent | cdd445d4b2a910ade742c3d6a86bc3fca4da9e0c (diff) | |
iio: ABI: Add support for floating-point numbers in buffer scan elements
In the data storage description of a scan element, the first character
after the colon can have the values 's' and 'u' to specify signed and
unsigned integers, respectively.
Add 'f' as an allowed value to specify floating-point numbers formatted
according to the IEEE 754 standard.
Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio')
| -rw-r--r-- | include/linux/iio/iio.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index e03b7e912d7d..96b05c86c325 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -191,6 +191,13 @@ struct iio_event_spec { #define IIO_SCAN_FORMAT_UNSIGNED_INT 'u' /** + * define IIO_SCAN_FORMAT_FLOAT - floating-point data format + * + * &iio_scan_type.format value for IEEE 754 floating-point numbers. + */ +#define IIO_SCAN_FORMAT_FLOAT 'f' + +/** * struct iio_scan_type - specification for channel data format in buffer * @sign: Deprecated, use @format instead. * @format: Data format, can have any of the IIO_SCAN_FORMAT_* |
