pm_wakeirq.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * pm_wakeirq.h - Device wakeirq helper functions
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  9. * kind, whether express or implied; without even the implied warranty
  10. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef _LINUX_PM_WAKEIRQ_H
  14. #define _LINUX_PM_WAKEIRQ_H
  15. #ifdef CONFIG_PM
  16. extern int dev_pm_set_wake_irq(struct device *dev, int irq);
  17. extern int dev_pm_set_dedicated_wake_irq(struct device *dev,
  18. int irq);
  19. extern void dev_pm_clear_wake_irq(struct device *dev);
  20. extern void dev_pm_enable_wake_irq(struct device *dev);
  21. extern void dev_pm_disable_wake_irq(struct device *dev);
  22. #else /* !CONFIG_PM */
  23. static inline int dev_pm_set_wake_irq(struct device *dev, int irq)
  24. {
  25. return 0;
  26. }
  27. static inline int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq)
  28. {
  29. return 0;
  30. }
  31. static inline void dev_pm_clear_wake_irq(struct device *dev)
  32. {
  33. }
  34. static inline void dev_pm_enable_wake_irq(struct device *dev)
  35. {
  36. }
  37. static inline void dev_pm_disable_wake_irq(struct device *dev)
  38. {
  39. }
  40. #endif /* CONFIG_PM */
  41. #endif /* _LINUX_PM_WAKEIRQ_H */