1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* pm_wakeirq.h - Device wakeirq helper functions */ 3 4 #ifndef _LINUX_PM_WAKEIRQ_H 5 #define _LINUX_PM_WAKEIRQ_H 6 7 #ifdef CONFIG_PM 8 9 extern int dev_pm_set_wake_irq(struct device *dev, int irq); 10 extern int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq); 11 extern int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq); 12 extern void dev_pm_clear_wake_irq(struct device *dev); 13 extern int devm_pm_set_wake_irq(struct device *dev, int irq); 14 15 #else /* !CONFIG_PM */ 16 17 static inline int dev_pm_set_wake_irq(struct device *dev, int irq) 18 { 19 return 0; 20 } 21 22 static inline int dev_pm_set_dedicated_wake_irq(struct device *dev, int irq) 23 { 24 return 0; 25 } 26 27 static inline int dev_pm_set_dedicated_wake_irq_reverse(struct device *dev, int irq) 28 { 29 return 0; 30 } 31 32 static inline void dev_pm_clear_wake_irq(struct device *dev) 33 { 34 } 35 36 static inline int devm_pm_set_wake_irq(struct device *dev, int irq) 37 { 38 return 0; 39 } 40 41 #endif /* CONFIG_PM */ 42 #endif /* _LINUX_PM_WAKEIRQ_H */ 43