Lines Matching refs:dev
61 struct device *dev; member
72 static inline bool device_can_wakeup(struct device *dev) in device_can_wakeup() argument
74 return dev->power.can_wakeup; in device_can_wakeup()
77 static inline bool device_may_wakeup(struct device *dev) in device_may_wakeup() argument
79 return dev->power.can_wakeup && !!dev->power.wakeup; in device_may_wakeup()
82 static inline void device_set_wakeup_path(struct device *dev) in device_set_wakeup_path() argument
84 dev->power.wakeup_path = true; in device_set_wakeup_path()
92 extern struct wakeup_source *wakeup_source_register(struct device *dev,
95 extern int device_wakeup_enable(struct device *dev);
96 extern int device_wakeup_disable(struct device *dev);
97 extern void device_set_wakeup_capable(struct device *dev, bool capable);
98 extern int device_init_wakeup(struct device *dev, bool val);
99 extern int device_set_wakeup_enable(struct device *dev, bool enable);
101 extern void pm_stay_awake(struct device *dev);
103 extern void pm_relax(struct device *dev);
105 extern void pm_wakeup_dev_event(struct device *dev, unsigned int msec, bool hard);
109 static inline void device_set_wakeup_capable(struct device *dev, bool capable) in device_set_wakeup_capable() argument
111 dev->power.can_wakeup = capable; in device_set_wakeup_capable()
114 static inline bool device_can_wakeup(struct device *dev) in device_can_wakeup() argument
116 return dev->power.can_wakeup; in device_can_wakeup()
130 static inline struct wakeup_source *wakeup_source_register(struct device *dev, in wakeup_source_register() argument
138 static inline int device_wakeup_enable(struct device *dev) in device_wakeup_enable() argument
140 dev->power.should_wakeup = true; in device_wakeup_enable()
144 static inline int device_wakeup_disable(struct device *dev) in device_wakeup_disable() argument
146 dev->power.should_wakeup = false; in device_wakeup_disable()
150 static inline int device_set_wakeup_enable(struct device *dev, bool enable) in device_set_wakeup_enable() argument
152 dev->power.should_wakeup = enable; in device_set_wakeup_enable()
156 static inline int device_init_wakeup(struct device *dev, bool val) in device_init_wakeup() argument
158 device_set_wakeup_capable(dev, val); in device_init_wakeup()
159 device_set_wakeup_enable(dev, val); in device_init_wakeup()
163 static inline bool device_may_wakeup(struct device *dev) in device_may_wakeup() argument
165 return dev->power.can_wakeup && dev->power.should_wakeup; in device_may_wakeup()
168 static inline void device_set_wakeup_path(struct device *dev) {} in device_set_wakeup_path() argument
172 static inline void pm_stay_awake(struct device *dev) {} in pm_stay_awake() argument
176 static inline void pm_relax(struct device *dev) {} in pm_relax() argument
181 static inline void pm_wakeup_dev_event(struct device *dev, unsigned int msec, in pm_wakeup_dev_event() argument
191 static inline void pm_wakeup_event(struct device *dev, unsigned int msec) in pm_wakeup_event() argument
193 return pm_wakeup_dev_event(dev, msec, false); in pm_wakeup_event()
196 static inline void pm_wakeup_hard_event(struct device *dev) in pm_wakeup_hard_event() argument
198 return pm_wakeup_dev_event(dev, 0, true); in pm_wakeup_hard_event()