iio_core_trigger.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* The industrial I/O core, trigger consumer handling functions
  2. *
  3. * Copyright (c) 2008 Jonathan Cameron
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License version 2 as published by
  7. * the Free Software Foundation.
  8. */
  9. #ifdef CONFIG_IIO_TRIGGER
  10. /**
  11. * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
  12. * @indio_dev: iio_dev associated with the device that will consume the trigger
  13. **/
  14. void iio_device_register_trigger_consumer(struct iio_dev *indio_dev);
  15. /**
  16. * iio_device_unregister_trigger_consumer() - reverse the registration process
  17. * @indio_dev: iio_dev associated with the device that consumed the trigger
  18. **/
  19. void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev);
  20. #else
  21. /**
  22. * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers
  23. * @indio_dev: iio_dev associated with the device that will consume the trigger
  24. **/
  25. static int iio_device_register_trigger_consumer(struct iio_dev *indio_dev)
  26. {
  27. return 0;
  28. }
  29. /**
  30. * iio_device_unregister_trigger_consumer() - reverse the registration process
  31. * @indio_dev: iio_dev associated with the device that consumed the trigger
  32. **/
  33. static void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev)
  34. {
  35. }
  36. #endif /* CONFIG_TRIGGER_CONSUMER */