drm/log: select CONFIG_FONT_SUPPORT
[drm/drm-misc.git] / drivers / iio / iio_core_trigger.h
blobe1a56824e07fe44f727601169d748b6e147ec99b
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* The industrial I/O core, trigger consumer handling functions
5 * Copyright (c) 2008 Jonathan Cameron
6 */
8 #ifdef CONFIG_IIO_TRIGGER
9 /**
10 * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
11 * @indio_dev: iio_dev associated with the device that will consume the trigger
13 * Return 0 if successful, negative otherwise
14 **/
15 int iio_device_register_trigger_consumer(struct iio_dev *indio_dev);
17 /**
18 * iio_device_unregister_trigger_consumer() - reverse the registration process
19 * @indio_dev: iio_dev associated with the device that consumed the trigger
20 **/
21 void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev);
24 int iio_trigger_attach_poll_func(struct iio_trigger *trig,
25 struct iio_poll_func *pf);
26 int iio_trigger_detach_poll_func(struct iio_trigger *trig,
27 struct iio_poll_func *pf);
29 #else
31 /**
32 * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
33 * @indio_dev: iio_dev associated with the device that will consume the trigger
34 **/
35 static inline int iio_device_register_trigger_consumer(struct iio_dev *indio_dev)
37 return 0;
40 /**
41 * iio_device_unregister_trigger_consumer() - reverse the registration process
42 * @indio_dev: iio_dev associated with the device that consumed the trigger
43 **/
44 static inline void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev)
48 static inline int iio_trigger_attach_poll_func(struct iio_trigger *trig,
49 struct iio_poll_func *pf)
51 return 0;
53 static inline int iio_trigger_detach_poll_func(struct iio_trigger *trig,
54 struct iio_poll_func *pf)
56 return 0;
59 #endif /* CONFIG_TRIGGER_CONSUMER */