diff options
| author | Zhang Lixu <lixu.zhang@intel.com> | 2026-06-10 16:29:10 +0800 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-06-29 23:24:46 +0100 |
| commit | 3ce8d099e0afc5a7da75a2007a67f67c4f5a4af1 (patch) | |
| tree | 4b1c08ac9dbc32c12dc34e668aa6f6ed58958895 /rust/zerocopy/src/pointer | |
| parent | f784fcea450617055d2d12eec5b2f6e0e38bf878 (diff) | |
iio: hid-sensor-rotation: Fix stale or zero output when reading raw values
When reading the raw quaternion attribute (in_rot_quaternion_raw), the
driver currently returns either all zeros (if the sensor was never enabled)
or stale data (if the sensor was previously enabled) because it reads from
the internal buffer without explicitly requesting a new sample from the
sensor.
To fix this, power up the sensor, call sensor_hub_input_attr_read_values()
to issue a synchronous GET_REPORT and receive the full quaternion data
directly into a local buffer, then decode the four components.
Fixes: fc18dddc0625 ("iio: hid-sensors: Added device rotation support")
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'rust/zerocopy/src/pointer')
0 files changed, 0 insertions, 0 deletions
