-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
staging:iio: spit trigger.h into provider and consumer parts.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- Loading branch information
Jonathan Cameron
authored and
Greg Kroah-Hartman
committed
Aug 24, 2011
1 parent
6aea1c3
commit 3f72395
Showing
20 changed files
with
71 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* The industrial I/O core, trigger consumer functions | ||
* | ||
* Copyright (c) 2008-2011 Jonathan Cameron | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 as published by | ||
* the Free Software Foundation. | ||
*/ | ||
|
||
/** | ||
* struct iio_poll_func - poll function pair | ||
* | ||
* @indio_dev: data specific to device (passed into poll func) | ||
* @h: the function that is actually run on trigger | ||
* @thread: threaded interrupt part | ||
* @type: the type of interrupt (basically if oneshot) | ||
* @name: name used to identify the trigger consumer. | ||
* @irq: the corresponding irq as allocated from the | ||
* trigger pool | ||
* @timestamp: some devices need a timestamp grabbed as soon | ||
* as possible after the trigger - hence handler | ||
* passes it via here. | ||
**/ | ||
struct iio_poll_func { | ||
struct iio_dev *indio_dev; | ||
irqreturn_t (*h)(int irq, void *p); | ||
irqreturn_t (*thread)(int irq, void *p); | ||
int type; | ||
char *name; | ||
int irq; | ||
s64 timestamp; | ||
}; | ||
|
||
|
||
struct iio_poll_func | ||
*iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p), | ||
irqreturn_t (*thread)(int irq, void *p), | ||
int type, | ||
struct iio_dev *indio_dev, | ||
const char *fmt, | ||
...); | ||
void iio_dealloc_pollfunc(struct iio_poll_func *pf); | ||
irqreturn_t iio_pollfunc_store_time(int irq, void *p); | ||
|
||
void iio_trigger_notify_done(struct iio_trigger *trig); | ||
|
||
/* | ||
* Two functions for common case where all that happens is a pollfunc | ||
* is attached and detached from a trigger | ||
*/ | ||
int iio_triggered_ring_postenable(struct iio_dev *indio_dev); | ||
int iio_triggered_ring_predisable(struct iio_dev *indio_dev); |