diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pm.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index 21db05ac7c0b..b0ab623adbf5 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -273,6 +273,20 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
273 | __suspend_report_result(__FUNCTION__, fn, ret); \ | 273 | __suspend_report_result(__FUNCTION__, fn, ret); \ |
274 | } while (0) | 274 | } while (0) |
275 | 275 | ||
276 | /* | ||
277 | * Platform hook to activate device wakeup capability, if that's not already | ||
278 | * handled by enable_irq_wake() etc. | ||
279 | * Returns zero on success, else negative errno | ||
280 | */ | ||
281 | extern int (*platform_enable_wakeup)(struct device *dev, int is_on); | ||
282 | |||
283 | static inline int call_platform_enable_wakeup(struct device *dev, int is_on) | ||
284 | { | ||
285 | if (platform_enable_wakeup) | ||
286 | return (*platform_enable_wakeup)(dev, is_on); | ||
287 | return 0; | ||
288 | } | ||
289 | |||
276 | #else /* !CONFIG_PM */ | 290 | #else /* !CONFIG_PM */ |
277 | 291 | ||
278 | static inline int device_suspend(pm_message_t state) | 292 | static inline int device_suspend(pm_message_t state) |
@@ -294,6 +308,11 @@ static inline void dpm_runtime_resume(struct device * dev) | |||
294 | 308 | ||
295 | #define suspend_report_result(fn, ret) do { } while (0) | 309 | #define suspend_report_result(fn, ret) do { } while (0) |
296 | 310 | ||
311 | static inline int call_platform_enable_wakeup(struct device *dev, int is_on) | ||
312 | { | ||
313 | return -EIO; | ||
314 | } | ||
315 | |||
297 | #endif | 316 | #endif |
298 | 317 | ||
299 | /* changes to device_may_wakeup take effect on the next pm state change. | 318 | /* changes to device_may_wakeup take effect on the next pm state change. |