summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFrancesco Lavra <flavra@baylibre.com>2026-03-24 09:47:33 +0100
committerJonathan Cameron <jic23@kernel.org>2026-04-27 09:58:16 +0100
commit7216b9f7e9fe34a1623cceee920caede8929078e (patch)
tree578633128ad8bbd110581cf73cde427c8c3caddd /include
parent5c2290c054f0746f34934540e7cb5160278f7e2b (diff)
downloadlinux-7216b9f7e9fe34a1623cceee920caede8929078e.tar.gz
linux-7216b9f7e9fe34a1623cceee920caede8929078e.zip
iio: imu: st_lsm6dsx: Fix check for invalid samples from FIFO
The DRDY_MASK feature implemented in sensor chips marks gyroscope and accelerometer invalid samples (i.e. samples that have been acquired during the settling time of sensor filters) with the special values 0x7FFFh, 0x7FFE, and 0x7FFD. The driver checks FIFO samples against these special values in order to discard invalid samples; however, it does the check regardless of the type of samples being processed, whereas this feature is specific to gyroscope and accelerometer data. This could cause valid samples to be discarded. Fix the above check so that it takes into account the type of samples being processed. To avoid casting to __le16 * when checking sample values, clean up the type representation for data read from the FIFO. Fixes: 960506ed2c69 ("iio: imu: st_lsm6dsx: enable drdy-mask if available") Signed-off-by: Francesco Lavra <flavra@baylibre.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions