• Ioana Ciornei's avatar
    staging: iio: dummy: complete IIO events delivery to userspace · 2e9fed42
    Ioana Ciornei authored
    Starting with commit fd2bb310 (Staging: iio: Move evgen interrupt
    generation to irq_work) event processing is handled by calling
    both the top half and the threaded part properly simulating real
    hardware interrupts making use of threaded interrupts.
    This way the processing is split in 2 parts:
    
    * the IRQ handler that runs in IRQ context and only saves the event
    timestamp
    * the threaded handler that runs in process context, reads the events
    and pushes the in the userspace.
    
    If the IRQ handler returns IRQ_HANDLED the threaded handler is not
    even being called since the interrupt is considered to be processed.
    Because the iio dummy driver processes the events in the threaded
    handler the IRQ handler must return IRQ_WAKE_THREAD so that the
    threaded part would be awakened and called.
    Signed-off-by: default avatarIoana Ciornei <ciorneiioana@gmail.com>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    2e9fed42
iio_simple_dummy_events.c 7.78 KB