summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMartin Kelly <martin@martingkelly.com>2018-10-29 06:18:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 21:32:13 +0300
commit855f9dc87160f9351291cbe52056fa08529532d3 (patch)
tree2c3f9435264c7f1b07b05f3053dcf104009753f6 /lib
parentec800c8b028ec5b42dc81421d04a6d4649d44b51 (diff)
downloadlinux-855f9dc87160f9351291cbe52056fa08529532d3.tar.xz
iio:st_magn: Fix enable device after trigger
commit fe5192ac81ad0d4dfe1395d11f393f0513c15f7f 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: 90efe055629 ("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>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions