linux_dsm_epyc7002/drivers/iio/imu/st_lsm6dsx
Lorenzo Bianconi 6e94b8314c iio: imu: st_lsm6dsx: fix edge-trigger interrupts
commit 3f9bce7a22a3f8ac9d885c9d75bc45569f24ac8b 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:54:24 +01:00
..
Kconfig iio: imu: st_lsm6dsx: add support to LSM6DSRX 2019-10-27 16:38:06 +00:00
Makefile iio: imu: st_lsm6dsx: add i3c basic support for LSM6DSO and LSM6DSR 2019-07-27 22:55:27 +01:00
st_lsm6dsx_buffer.c iio:imu:st_lsm6dsx Fix alignment and data leak issues 2020-09-21 20:01:51 +01:00
st_lsm6dsx_core.c iio: imu: st_lsm6dsx: fix edge-trigger interrupts 2020-12-30 11:54:24 +01:00
st_lsm6dsx_i2c.c iio: st_lsm6dsx: Drop unneeded OF code 2019-12-29 15:20:04 +00: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: set 10ms as min shub slave timeout 2020-11-01 20:54:15 +00:00
st_lsm6dsx_spi.c iio: st_lsm6dsx: Drop unneeded OF code 2019-12-29 15:20:04 +00:00
st_lsm6dsx.h iio:imu:st_lsm6dsx Fix alignment and data leak issues 2020-09-21 20:01:51 +01:00