Jonathan Cameron | 847ec80 | 2009-08-18 18:06:19 +0100 | [diff] [blame] | 1 | |
| 2 | /* The industrial I/O core, trigger consumer handling functions |
| 3 | * |
| 4 | * Copyright (c) 2008 Jonathan Cameron |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License version 2 as published by |
| 8 | * the Free Software Foundation. |
| 9 | */ |
| 10 | |
Jonathan Cameron | 1637db4 | 2009-08-18 18:06:26 +0100 | [diff] [blame] | 11 | #ifdef CONFIG_IIO_TRIGGER |
| 12 | /** |
Randy Dunlap | 4c57260 | 2009-10-04 19:34:02 -0700 | [diff] [blame] | 13 | * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers |
Jonathan Cameron | f8c6f4e | 2011-10-06 17:14:35 +0100 | [diff] [blame] | 14 | * @indio_dev: iio_dev associated with the device that will consume the trigger |
Jonathan Cameron | 1637db4 | 2009-08-18 18:06:26 +0100 | [diff] [blame] | 15 | **/ |
Jonathan Cameron | 67be8e3 | 2011-10-26 17:27:38 +0100 | [diff] [blame] | 16 | void iio_device_register_trigger_consumer(struct iio_dev *indio_dev); |
Randy Dunlap | 4c57260 | 2009-10-04 19:34:02 -0700 | [diff] [blame] | 17 | |
Jonathan Cameron | 1637db4 | 2009-08-18 18:06:26 +0100 | [diff] [blame] | 18 | /** |
Randy Dunlap | 4c57260 | 2009-10-04 19:34:02 -0700 | [diff] [blame] | 19 | * iio_device_unregister_trigger_consumer() - reverse the registration process |
Jonathan Cameron | f8c6f4e | 2011-10-06 17:14:35 +0100 | [diff] [blame] | 20 | * @indio_dev: iio_dev associated with the device that consumed the trigger |
Jonathan Cameron | 1637db4 | 2009-08-18 18:06:26 +0100 | [diff] [blame] | 21 | **/ |
Jonathan Cameron | f8c6f4e | 2011-10-06 17:14:35 +0100 | [diff] [blame] | 22 | void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev); |
Jonathan Cameron | 1637db4 | 2009-08-18 18:06:26 +0100 | [diff] [blame] | 23 | |
| 24 | #else |
| 25 | |
Jonathan Cameron | 847ec80 | 2009-08-18 18:06:19 +0100 | [diff] [blame] | 26 | /** |
Randy Dunlap | 4c57260 | 2009-10-04 19:34:02 -0700 | [diff] [blame] | 27 | * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers |
Jonathan Cameron | f8c6f4e | 2011-10-06 17:14:35 +0100 | [diff] [blame] | 28 | * @indio_dev: iio_dev associated with the device that will consume the trigger |
Jonathan Cameron | 847ec80 | 2009-08-18 18:06:19 +0100 | [diff] [blame] | 29 | **/ |
Jonathan Cameron | f8c6f4e | 2011-10-06 17:14:35 +0100 | [diff] [blame] | 30 | static int iio_device_register_trigger_consumer(struct iio_dev *indio_dev) |
Jonathan Cameron | 847ec80 | 2009-08-18 18:06:19 +0100 | [diff] [blame] | 31 | { |
| 32 | return 0; |
Peter Meerwald | 70ea35fb | 2013-07-07 21:24:00 +0100 | [diff] [blame] | 33 | } |
Randy Dunlap | 4c57260 | 2009-10-04 19:34:02 -0700 | [diff] [blame] | 34 | |
Jonathan Cameron | 847ec80 | 2009-08-18 18:06:19 +0100 | [diff] [blame] | 35 | /** |
| 36 | * iio_device_unregister_trigger_consumer() - reverse the registration process |
Jonathan Cameron | f8c6f4e | 2011-10-06 17:14:35 +0100 | [diff] [blame] | 37 | * @indio_dev: iio_dev associated with the device that consumed the trigger |
Jonathan Cameron | 847ec80 | 2009-08-18 18:06:19 +0100 | [diff] [blame] | 38 | **/ |
Jonathan Cameron | f8c6f4e | 2011-10-06 17:14:35 +0100 | [diff] [blame] | 39 | static void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev) |
Jonathan Cameron | 847ec80 | 2009-08-18 18:06:19 +0100 | [diff] [blame] | 40 | { |
Peter Meerwald | 70ea35fb | 2013-07-07 21:24:00 +0100 | [diff] [blame] | 41 | } |
Jonathan Cameron | 1637db4 | 2009-08-18 18:06:26 +0100 | [diff] [blame] | 42 | |
| 43 | #endif /* CONFIG_TRIGGER_CONSUMER */ |