linux/drivers/iio
Martin Kelly 855f9dc871 iio:st_magn: Fix enable device after trigger
commit fe5192ac81 upstream.

Currently, we enable the device before we enable the device trigger. At
high frequencies, this can cause interrupts that don't yet have a poll
function associated with them and are thus treated as spurious. At high
frequencies with level interrupts, this can even cause an interrupt storm
of repeated spurious interrupts (~100,000 on my Beagleboard with the
LSM9DS1 magnetometer). If these repeat too much, the interrupt will get
disabled and the device will stop functioning.

To prevent these problems, enable the device prior to enabling the device
trigger, and disable the divec prior to disabling the trigger. This means
there's no window of time during which the device creates interrupts but we
have no trigger to answer them.

Fixes: 90efe05562 ("iio: st_sensors: harden interrupt handling")
Signed-off-by: Martin Kelly <martin@martingkelly.com>
Tested-by: Denis Ciocca <denis.ciocca@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 19:32:13 +01:00
..
accel iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
adc iio: adc: at91: fix wrong channel number in triggered buffer mode 2018-11-13 11:08:47 -08:00
afe iio: afe: rescale: new driver 2018-04-28 18:03:22 +01:00
amplifiers iio: amplifiers: ad8366: move channel init before iio_device_register() 2018-05-22 18:13:45 +01:00
buffer iio:kfifo_buf: check for uint overflow 2018-03-30 11:16:12 +01:00
chemical iio: chemical: Add support for Bosch BME680 sensor 2018-07-28 11:38:46 +01:00
common iio: change strncpy+truncation to strlcpy 2018-07-15 11:38:06 +01:00
counter iio: 104-quad-8: Provide defines for magic numbers 2018-06-10 11:52:30 +01:00
dac iio: ad5064: Fix regulator handling 2018-11-13 11:08:47 -08:00
dummy
frequency Merge branch 'fixes-togreg' into togreg 2018-08-01 18:56:17 +01:00
gyro iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
health
humidity iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
imu iio: imu: st_lsm6dsx: take into account ts samples in wm configuration 2018-09-02 21:19:53 +01:00
light iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
magnetometer iio:st_magn: Fix enable device after trigger 2018-12-05 19:32:13 +01:00
multiplexer treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
orientation iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
potentiometer iio: potentiometer: mcp4531: switch to using .probe_new 2018-04-15 18:12:51 +01:00
potentiostat iio: potentiostat: lmp91000: add LMP91002 support 2018-05-12 11:02:44 +01:00
pressure iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
proximity iio: light: isl29501: Add support for the ISL29501 ToF sensor. 2018-07-23 19:18:10 +01:00
resolver staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00
temperature iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-12-05 19:32:13 +01:00
trigger
iio_core_trigger.h
iio_core.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c iio: Add modifier for DUV light 2018-07-23 19:18:10 +01:00
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
Kconfig staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00
Makefile staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00