Re: [PATCH v6 4/7] iio: Rename 'sign' field to `format` in struct iio_scan_type

From: Jonathan Cameron

Date: Sat Feb 28 2026 - 15:03:45 EST


On Wed, 25 Feb 2026 15:27:01 -0600
David Lechner <dlechner@xxxxxxxxxxxx> wrote:

> On 2/25/26 4:17 AM, Francesco Lavra wrote:
> > This field is used to differentiate between signed and unsigned integers.
> > A following commit will extend its use to in order to add support for non-
> > integer scan elements; therefore, change its name from 'sign' to a more
> > generic 'format'.
> >
>
> Maybe Jonathan is OK with doing this all at once, but another alternative
> could be to introduce a union to allow both names at the same time, then
> we could make the change more gradually.

Please do the union for v7. Not so much because I mind a global change, but
more because the chances of merge conflicts are too high.

Perhaps for this series just introduce the union and use it in the driver
here. We can then chase it through the rest of the tree as a separate step.

Alternatively leave it with a misleading name for now (so allow 'f' to be a
magic sign value) and we can do the rename as a follow up.

Jonathan