Re: [PATCH v6 5/7] iio: ABI: Add support for floating-point numbers in buffer scan elements

From: Andy Shevchenko

Date: Wed Feb 25 2026 - 06:32:41 EST


On Wed, Feb 25, 2026 at 11:17:47AM +0100, Francesco Lavra wrote:
> 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.

Main Q here: How will behave iio-tools and other existing user space when
it sees this? Shouldn't you prepare the user space first for such a change?

...

> - Format is [be|le]:[s|u]bits/storagebits[Xrepeat][>>shift] .
> + Format is [be|le]:[s|u|f]bits/storagebits[Xrepeat][>>shift] .

I would probably keep order as [f|s|u] and...

> - * *s* or *u*, specifies if signed (2's complement) or unsigned.
> + * *s* or *u* or *f*, specifies if signed (2's complement) or unsigned or
> + floating-point.

* *f*, specifies if floating-point.
* *s* or *u*, specifies if signed (2's complement) or unsigned.

...

> - **be** or **le** specifies big or little-endian.
> -- **s** or **u** specifies if signed (2's complement) or unsigned.
> +- **s** or **u** or **f** specifies if signed (2's complement) or unsigned or
> + floating-point.

Ditto.

--
With Best Regards,
Andy Shevchenko