Re: [PATCH v6 6/7] iio: ABI: Add custom data type
From: Andy Shevchenko
Date: Thu Feb 26 2026 - 04:23:53 EST
On Wed, Feb 25, 2026 at 03:27:55PM -0600, David Lechner wrote:
> On 2/25/26 5:43 AM, Andy Shevchenko wrote:
> > On Wed, Feb 25, 2026 at 11:18:06AM +0100, Francesco Lavra wrote:
> >> This type is used when the data received from or sent to a device cannot be
> >> identified with a standard type and must be processed by custom userspace.
> >> Any driver using the custom type must provide a driver-specific document
> >> that explains what the data represents and how it is to be interpreted by
> >> userspace.
> >
> > This rises the same Q as for other firmware-hidden algos, et cetera: How
> > can we prevent the kernel from being just a simple proxy between HW and
> > the userspace? What would be the point of having the "driver" in the kernel
> > space?
>
> I tend to agree that this opens the door for misuse or an excuse to not
> make the effort to develop something more generally useful on future drivers.
>
> For this patch series, could we still use IIO_ROT and introduce a
> new IIO_MOD_PARTIAL_QUATERNION that is defined according to the
> description in the documentation patch in this series? This may be
> the only driver that ever uses it, but it is still clearly defined.
>
> Or perhaps we could even say that if a IIO_MOD_QUATERNION has
> .repeat = 3 instead of .repeat = 4, then it should be interpreted
> this way?
Not sure about the latter, but something explicit like
IIO_MOD_PARTIAL_QUATERNION sounds good to me.
--
With Best Regards,
Andy Shevchenko