From: Jonathan Cameron Date: Wed, 18 May 2011 13:41:21 +0000 (+0100) Subject: staging:iio: add generic data ready poll function. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8384d9573e937949eba96eaa1323253c2687aa5c;p=openwrt%2Fstaging%2Fblogic.git staging:iio: add generic data ready poll function. This case is extremely common, so let us only have the one copy. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/industrialio-trigger.c b/drivers/staging/iio/industrialio-trigger.c index 5496ee272e2e..d045b6c32881 100644 --- a/drivers/staging/iio/industrialio-trigger.c +++ b/drivers/staging/iio/industrialio-trigger.c @@ -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--; diff --git a/drivers/staging/iio/trigger.h b/drivers/staging/iio/trigger.h index 0c44c5efd01f..8e25c004ebf3 100644 --- a/drivers/staging/iio/trigger.h +++ b/drivers/staging/iio/trigger.h @@ -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;