staging:iio: add generic data ready poll function.
authorJonathan Cameron <jic23@cam.ac.uk>
Wed, 18 May 2011 13:41:21 +0000 (14:41 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 19 May 2011 23:14:49 +0000 (16:14 -0700)
This case is extremely common, so let us only have the one
copy.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/industrialio-trigger.c
drivers/staging/iio/trigger.h

index 5496ee272e2e5afbbdf2e2a62322c8184cc9cfe4..d045b6c32881093489553545d7dbae95ecbb48ae 100644 (file)
@@ -189,6 +189,13 @@ void iio_trigger_poll(struct iio_trigger *trig, s64 time)
 }
 EXPORT_SYMBOL(iio_trigger_poll);
 
+irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private)
+{
+       iio_trigger_poll(private, iio_get_time_ns());
+       return IRQ_HANDLED;
+}
+EXPORT_SYMBOL(iio_trigger_generic_data_rdy_poll);
+
 void iio_trigger_notify_done(struct iio_trigger *trig)
 {
        trig->use_count--;
index 0c44c5efd01f7856283bee1b247bfb2b7e90fc68..8e25c004ebf35a3830efee02c948f872ad13f803 100644 (file)
@@ -127,6 +127,8 @@ int iio_trigger_dettach_poll_func(struct iio_trigger *trig,
 void iio_trigger_poll(struct iio_trigger *trig, s64 time);
 void iio_trigger_notify_done(struct iio_trigger *trig);
 
+irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private);
+
 static inline int iio_trigger_get_irq(struct iio_trigger *trig)
 {
        int ret;