Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8384d957 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman
Browse files

staging:iio: add generic data ready poll function.



This case is extremely common, so let us only have the one
copy.

Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e0580032
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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--;
+2 −0
Original line number Diff line number Diff line
@@ -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;