Re: [PATCH 1/2] HID: sensor-hub: Add sensor_hub_input_attr_read_values() for multi-byte reads
From: Jonathan Cameron
Date: Thu Jun 11 2026 - 12:46:13 EST
On Wed, 10 Jun 2026 18:41:27 +0200 (CEST)
Jiri Kosina <jikos@xxxxxxxxxx> wrote:
> On Wed, 10 Jun 2026, Zhang Lixu wrote:
>
> > From: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> >
> > sensor_hub_input_attr_get_raw_value() is limited to returning a single
> > 32-bit value, which is insufficient for sensors that report data larger
> > than 32 bits, such as a quaternion with four s16 elements.
> >
> > Add sensor_hub_input_attr_read_values() that accepts a caller-provided
> > buffer and accumulates incoming data until the buffer is full. The two
> > paths are distinguished in sensor_hub_raw_event() by pending.max_raw_size
> > being non-zero, preserving backward compatibility.
> >
> > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> > Co-developed-by: Zhang Lixu <lixu.zhang@xxxxxxxxx>
> > Signed-off-by: Zhang Lixu <lixu.zhang@xxxxxxxxx>
>
> Acked-by: Jiri Kosina <jkosina@xxxxxxxx>
>
> Jonathan, will you take the whole lot through your tree?
>
I can do that, but as a fix after rc1 now (and only once I have
a suitable Fixes tag).
Thanks,
Jonathan
> Thanks,
>