hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/iio/iio_core_trigger.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12
23 /* The industrial I/O core, trigger consumer handling functions
34 *
45 * 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.
96 */
107
118 #ifdef CONFIG_IIO_TRIGGER
....@@ -21,13 +18,19 @@
2118 **/
2219 void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev);
2320
21
+
22
+int iio_trigger_attach_poll_func(struct iio_trigger *trig,
23
+ struct iio_poll_func *pf);
24
+int iio_trigger_detach_poll_func(struct iio_trigger *trig,
25
+ struct iio_poll_func *pf);
26
+
2427 #else
2528
2629 /**
2730 * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
2831 * @indio_dev: iio_dev associated with the device that will consume the trigger
2932 **/
30
-static int iio_device_register_trigger_consumer(struct iio_dev *indio_dev)
33
+static inline int iio_device_register_trigger_consumer(struct iio_dev *indio_dev)
3134 {
3235 return 0;
3336 }
....@@ -36,8 +39,19 @@
3639 * iio_device_unregister_trigger_consumer() - reverse the registration process
3740 * @indio_dev: iio_dev associated with the device that consumed the trigger
3841 **/
39
-static void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev)
42
+static inline void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev)
4043 {
4144 }
4245
46
+static inline int iio_trigger_attach_poll_func(struct iio_trigger *trig,
47
+ struct iio_poll_func *pf)
48
+{
49
+ return 0;
50
+}
51
+static inline int iio_trigger_detach_poll_func(struct iio_trigger *trig,
52
+ struct iio_poll_func *pf)
53
+{
54
+ return 0;
55
+}
56
+
4357 #endif /* CONFIG_TRIGGER_CONSUMER */