Commit 734be17b authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Xie XiuQi
Browse files

iio: imu: st_lsm6dsx: fix edge-trigger interrupts



stable inclusion
from stable-5.10.4
commit 6e94b8314c1f9d719e1ac87391b934eb7ea1af42
bugzilla: 46903

--------------------------------

commit 3f9bce7a 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: 89ca88a7 ("iio: imu: st_lsm6dsx: support active-low interrupts")
Fixes: 290a6ce1 ("iio: imu: add support to lsm6dsx driver")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/5e93cda7dc1e665f5685c53ad8e9ea71dbae782d.1605378871.git.lorenzo@kernel.org


Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 3060eaea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment