Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
trigger_consumer.h
Go to the documentation of this file.
1 /* The industrial I/O core, trigger consumer functions
2  *
3  * Copyright (c) 2008-2011 Jonathan Cameron
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published by
7  * the Free Software Foundation.
8  */
9 
10 #ifndef __LINUX_IIO_TRIGGER_CONSUMER_H__
11 #define __LINUX_IIO_TRIGGER_CONSUMER_H__
12 
13 #include <linux/interrupt.h>
14 #include <linux/types.h>
15 
16 struct iio_dev;
17 struct iio_trigger;
18 
33 struct iio_poll_func {
34  struct iio_dev *indio_dev;
35  irqreturn_t (*h)(int irq, void *p);
36  irqreturn_t (*thread)(int irq, void *p);
37  int type;
38  char *name;
39  int irq;
41 };
42 
43 
44 struct iio_poll_func
45 *iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p),
46  irqreturn_t (*thread)(int irq, void *p),
47  int type,
48  struct iio_dev *indio_dev,
49  const char *fmt,
50  ...);
52 irqreturn_t iio_pollfunc_store_time(int irq, void *p);
53 
54 void iio_trigger_notify_done(struct iio_trigger *trig);
55 
56 /*
57  * Two functions for common case where all that happens is a pollfunc
58  * is attached and detached from a trigger
59  */
62 
63 #endif