]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - drivers/iio/iio_core_trigger.h
UBUNTU: Start new release
[mirror_ubuntu-hirsute-kernel.git] / drivers / iio / iio_core_trigger.h
CommitLineData
d2912cb1 1/* SPDX-License-Identifier: GPL-2.0-only */
847ec80b
JC
2
3/* The industrial I/O core, trigger consumer handling functions
4 *
5 * Copyright (c) 2008 Jonathan Cameron
847ec80b
JC
6 */
7
1637db44
JC
8#ifdef CONFIG_IIO_TRIGGER
9/**
4c572605 10 * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
f8c6f4e9 11 * @indio_dev: iio_dev associated with the device that will consume the trigger
1637db44 12 **/
67be8e32 13void iio_device_register_trigger_consumer(struct iio_dev *indio_dev);
4c572605 14
1637db44 15/**
4c572605 16 * iio_device_unregister_trigger_consumer() - reverse the registration process
f8c6f4e9 17 * @indio_dev: iio_dev associated with the device that consumed the trigger
1637db44 18 **/
f8c6f4e9 19void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev);
1637db44 20
f11d59d8
LPC
21
22int iio_trigger_attach_poll_func(struct iio_trigger *trig,
23 struct iio_poll_func *pf);
24int iio_trigger_detach_poll_func(struct iio_trigger *trig,
25 struct iio_poll_func *pf);
26
1637db44
JC
27#else
28
847ec80b 29/**
4c572605 30 * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
f8c6f4e9 31 * @indio_dev: iio_dev associated with the device that will consume the trigger
847ec80b 32 **/
4d55cb8e 33static inline int iio_device_register_trigger_consumer(struct iio_dev *indio_dev)
847ec80b
JC
34{
35 return 0;
70ea35fb 36}
4c572605 37
847ec80b
JC
38/**
39 * iio_device_unregister_trigger_consumer() - reverse the registration process
f8c6f4e9 40 * @indio_dev: iio_dev associated with the device that consumed the trigger
847ec80b 41 **/
4d55cb8e 42static inline void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev)
847ec80b 43{
70ea35fb 44}
1637db44 45
f11d59d8
LPC
46static inline int iio_trigger_attach_poll_func(struct iio_trigger *trig,
47 struct iio_poll_func *pf)
48{
49 return 0;
50}
51static inline int iio_trigger_detach_poll_func(struct iio_trigger *trig,
52 struct iio_poll_func *pf)
53{
54 return 0;
55}
56
1637db44 57#endif /* CONFIG_TRIGGER_CONSUMER */