summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/accel/lis3l02dq_ring.c
diff options
context:
space:
mode:
authorLars-Peter Clausen2012-09-06 11:05:00 +0200
committerJonathan Cameron2012-09-06 23:00:28 +0200
commitf38bc926d022ebd67baad6ac7fc22c95fbc6238c (patch)
tree807902c14117a60e161adec48ee00dd8c0e74cb6 /drivers/staging/iio/accel/lis3l02dq_ring.c
parentiio: hid-sensors: Added ALS (diff)
downloadkernel-qcow2-linux-f38bc926d022ebd67baad6ac7fc22c95fbc6238c.tar.gz
kernel-qcow2-linux-f38bc926d022ebd67baad6ac7fc22c95fbc6238c.tar.xz
kernel-qcow2-linux-f38bc926d022ebd67baad6ac7fc22c95fbc6238c.zip
staging:iio:sysfs-trigger: Use irq_work to properly active trigger
Since iio_trigger_poll() calls generic_handle_irq() it need to be called from hardirq context. The sysfs trigger is kicked from userspace, so it is obviously not possible to fulfill this requirement by calling iio_trigger_poll directly. As a workaround commit 1f785681 ("staging:iio:trigger sysfs userspace trigger rework.") added iio_trigger_poll_chained() which uses handle_nested_irq instead of generic_handle_irq. This in itself is a hack and only works by chance. handle_nested_irq is intended to be called from the threaded interrupt handler of the parent IRQ. Using handle_nested_irq is also problematic since it will only call the threaded handler of the IRQ. But quite a few IIO drivers rely on their hardirq handler being called or undefined behaviour will occur. This patch uses the irq_work framework to schedule the call to iio_trigger_poll() from hardirq context, which fixes the issues described above. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/accel/lis3l02dq_ring.c')
0 files changed, 0 insertions, 0 deletions