TencentOS-kernel/drivers/iio
Lorenzo Bianconi 33f5173203 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: 89ca88a7cdf2 ("iio: imu: st_lsm6dsx: support active-low interrupts")
Fixes: 290a6ce11d93 ("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-04-12 12:51:18 +08:00
..
accel iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode 2021-03-16 16:41:28 +08:00
adc iio:adc:ti-ads124s08: Fix alignment and data leak issues. 2021-03-16 16:43:43 +08:00
afe Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
amplifiers Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
buffer Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
chemical iio:chemical:ccs811: Fix timestamp alignment and prevent data leak. 2021-03-16 16:36:02 +08:00
common iio: cros_ec: Set Gyroscope default frequency to 25Hz 2021-03-16 16:36:00 +08:00
dac iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw() 2021-03-16 16:34:03 +08:00
dummy Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
frequency Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
gyro iio:gyro:itg3200: Fix timestamp alignment and prevent data leak. 2021-03-16 16:40:05 +08:00
health iio:health:afe4404 Fix timestamp alignment and prevent data leak. 2021-03-16 16:31:57 +08:00
humidity iio:humidity:hts221 Fix alignment and data leak issues 2021-03-16 16:31:50 +08:00
imu iio: imu: st_lsm6dsx: fix edge-trigger interrupts 2021-04-12 12:51:18 +08:00
light iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. 2021-03-16 16:43:42 +08:00
magnetometer iio:magnetometer:mag3110: Fix alignment and data leak issues. 2021-03-16 16:43:42 +08:00
multiplexer Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
orientation Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
potentiometer Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
potentiostat Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pressure iio:pressure:mpl3115: Force alignment of buffer 2021-03-16 16:43:43 +08:00
proximity iio:proximity:mb1232: Fix timestamp alignment and prevent data leak. 2021-03-16 16:36:01 +08:00
resolver Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
temperature Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
trigger iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context 2021-03-16 16:43:01 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
iio_core.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
iio_core_trigger.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
industrialio-buffer.c iio: buffer: Fix demux update 2021-03-16 16:43:42 +08:00
industrialio-configfs.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
industrialio-core.c iio: core: add missing IIO_MOD_H2/ETHANOL string identifiers 2021-03-16 16:31:50 +08:00
industrialio-event.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
industrialio-sw-device.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
industrialio-sw-trigger.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
industrialio-trigger.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
industrialio-triggered-event.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
inkern.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00