aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/pm.h10
-rw-r--r--include/linux/suspend.h7
2 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 8e258c727971..b417fc46f3fc 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -457,6 +457,7 @@ struct dev_pm_info {
457#ifdef CONFIG_PM_SLEEP 457#ifdef CONFIG_PM_SLEEP
458 struct list_head entry; 458 struct list_head entry;
459 struct completion completion; 459 struct completion completion;
460 unsigned long wakeup_count;
460#endif 461#endif
461#ifdef CONFIG_PM_RUNTIME 462#ifdef CONFIG_PM_RUNTIME
462 struct timer_list suspend_timer; 463 struct timer_list suspend_timer;
@@ -552,6 +553,11 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
552 } while (0) 553 } while (0)
553 554
554extern void device_pm_wait_for_dev(struct device *sub, struct device *dev); 555extern void device_pm_wait_for_dev(struct device *sub, struct device *dev);
556
557/* drivers/base/power/wakeup.c */
558extern void pm_wakeup_event(struct device *dev, unsigned int msec);
559extern void pm_stay_awake(struct device *dev);
560extern void pm_relax(void);
555#else /* !CONFIG_PM_SLEEP */ 561#else /* !CONFIG_PM_SLEEP */
556 562
557#define device_pm_lock() do {} while (0) 563#define device_pm_lock() do {} while (0)
@@ -565,6 +571,10 @@ static inline int dpm_suspend_start(pm_message_t state)
565#define suspend_report_result(fn, ret) do {} while (0) 571#define suspend_report_result(fn, ret) do {} while (0)
566 572
567static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {} 573static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {}
574
575static inline void pm_wakeup_event(struct device *dev, unsigned int msec) {}
576static inline void pm_stay_awake(struct device *dev) {}
577static inline void pm_relax(void) {}
568#endif /* !CONFIG_PM_SLEEP */ 578#endif /* !CONFIG_PM_SLEEP */
569 579
570/* How to reorder dpm_list after device_move() */ 580/* How to reorder dpm_list after device_move() */
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index bc7d6bb4cd8e..bf1bab7b059c 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -286,6 +286,13 @@ extern int unregister_pm_notifier(struct notifier_block *nb);
286 { .notifier_call = fn, .priority = pri }; \ 286 { .notifier_call = fn, .priority = pri }; \
287 register_pm_notifier(&fn##_nb); \ 287 register_pm_notifier(&fn##_nb); \
288} 288}
289
290/* drivers/base/power/wakeup.c */
291extern bool events_check_enabled;
292
293extern bool pm_check_wakeup_events(void);
294extern bool pm_get_wakeup_count(unsigned long *count);
295extern bool pm_save_wakeup_count(unsigned long count);
289#else /* !CONFIG_PM_SLEEP */ 296#else /* !CONFIG_PM_SLEEP */
290 297
291static inline int register_pm_notifier(struct notifier_block *nb) 298static inline int register_pm_notifier(struct notifier_block *nb)