1
0
Fork 0
alistair23-linux/drivers/iio/imu
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
..
bmi160 iio:imu:bmi160: Fix alignment and data leak issues 2021-01-09 13:44:54 +01:00
inv_mpu6050 iio: imu: inv_mpu6050: fix temperature reporting using bad unit 2019-12-17 19:55:42 +01:00
st_lsm6dsx iio: imu: st_lsm6dsx: fix edge-trigger interrupts 2021-01-17 14:05:34 +01:00
Kconfig iio: imu: Add support for the ADIS16460 IMU 2019-07-27 22:52:06 +01:00
Makefile iio: imu: Add support for the ADIS16460 IMU 2019-07-27 22:52:06 +01:00
adis.c iio: imu: adis: Add support for SPI transfer cs_change_delay 2019-07-27 22:52:06 +01:00
adis16400.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
adis16460.c iio: imu: adis16460: fix variable signedness 2019-08-18 18:53:15 +01:00
adis16480.c iio: imu: adis16480: assign bias value only if operation succeeded 2020-01-17 19:48:48 +01:00
adis_buffer.c iio: imu: adis16400: fix memory leak 2019-10-09 19:11:27 +01:00
adis_trigger.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149 2019-05-30 11:25:18 -07:00
kmx61.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330 2019-06-05 17:37:06 +02:00