Re: [PATCH] iio: orientation: hid-sensor-rotation: use ext_scan_type
From: David Lechner
Date: Sun Mar 01 2026 - 17:13:08 EST
On 2/14/26 3:25 PM, David Lechner wrote:
> Make use of ext_scan_type to handle the dynamic realbits size of the
> quaternion data. This lets us implement it using static data rather than
> having to duplicate the channel info for each driver instance.
>
> Signed-off-by: David Lechner <dlechner@xxxxxxxxxxxx>
> ---
> This is something I noticed we could do while looking at an unrelated
> bug. I'm not sure I have hardware I could test this on, so it is only
> compile-tested. It would be good to get a Tested-by: from someone before
> applying this. Also, I'm not sure if 8, 16 and 32-bit data are all
> possible, so if someone knows, please chime in.
While looking at some bugs in this driver, I found in the code where
we can be certain that only 16 and 32-bit are used. And I figured out
a way to test with /dev/uhid. So I will drop the 8-bit case, test it
and send a v2.