1
0
Fork 0
alistair23-linux/drivers/iio/imu/st_lsm6dsx
Lorenzo Bianconi 6f367fb1b7 iio: imu: st_lsm6dsx: fix edge-trigger interrupts
commit 3f9bce7a22 upstream

If we are using edge IRQs, new samples can arrive while processing
current interrupt since there are no hw guarantees the irq line
stays "low" long enough to properly detect the new interrupt.
In this case the new sample will be missed.
Polling FIFO status register in st_lsm6dsx_handler_thread routine
allow us to read new samples even if the interrupt arrives while
processing previous data and the timeslot where the line is "low"
is too short to be properly detected.

Fixes: 89ca88a7cd ("iio: imu: st_lsm6dsx: support active-low interrupts")
Fixes: 290a6ce11d ("iio: imu: add support to lsm6dsx driver")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/5e93cda7dc1e665f5685c53ad8e9ea71dbae782d.1605378871.git.lorenzo@kernel.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
[sudip: manual backport to old irq handler path]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-17 14:05:34 +01:00
..
Kconfig iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1 2019-09-03 18:55:50 +01:00
Makefile iio: imu: st_lsm6dsx: add i3c basic support for LSM6DSO and LSM6DSR 2019-07-27 22:55:27 +01:00
st_lsm6dsx.h iio: imu: st_lsm6dsx: forbid 0 sensor sensitivity 2019-09-08 12:35:08 +01:00
st_lsm6dsx_buffer.c iio: imu: st_lsm6dsx: fix edge-trigger interrupts 2021-01-17 14:05:34 +01:00
st_lsm6dsx_core.c iio: imu: st_lsm6dsx: Fix selection of ST_LSM6DS3_ID 2020-01-23 08:22:33 +01:00
st_lsm6dsx_i2c.c iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1 2019-09-03 18:55:50 +01:00
st_lsm6dsx_i3c.c iio: imu: st_lsm6dsx: add i3c basic support for LSM6DSO and LSM6DSR 2019-07-27 22:55:27 +01:00
st_lsm6dsx_shub.c iio: imu: st_lsm6dsx: fix waitime for st_lsm6dsx i2c controller 2019-10-09 19:11:28 +01:00
st_lsm6dsx_spi.c iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1 2019-09-03 18:55:50 +01:00