PM / Wakeup: Introduce wakeup source objects and event statistics (v3)
[deliverable/linux.git] / include / linux / pm.h
index 52e8c55ff314ce9ffa92b14b11ff5603a4e77eb6..a84118911ced60c1ada69a1bc777db600889461a 100644 (file)
@@ -448,23 +448,24 @@ enum rpm_request {
        RPM_REQ_RESUME,
 };
 
+struct wakeup_source;
+
 struct dev_pm_info {
        pm_message_t            power_state;
        unsigned int            can_wakeup:1;
-       unsigned int            should_wakeup:1;
        unsigned                async_suspend:1;
        enum dpm_state          status;         /* Owned by the PM core */
+       spinlock_t              lock;
 #ifdef CONFIG_PM_SLEEP
        struct list_head        entry;
        struct completion       completion;
-       unsigned long           wakeup_count;
+       struct wakeup_source    *wakeup;
 #endif
 #ifdef CONFIG_PM_RUNTIME
        struct timer_list       suspend_timer;
        unsigned long           timer_expires;
        struct work_struct      work;
        wait_queue_head_t       wait_queue;
-       spinlock_t              lock;
        atomic_t                usage_count;
        atomic_t                child_count;
        unsigned int            disable_depth:3;
@@ -559,11 +560,6 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
        } while (0)
 
 extern void device_pm_wait_for_dev(struct device *sub, struct device *dev);
-
-/* drivers/base/power/wakeup.c */
-extern void pm_wakeup_event(struct device *dev, unsigned int msec);
-extern void pm_stay_awake(struct device *dev);
-extern void pm_relax(void);
 #else /* !CONFIG_PM_SLEEP */
 
 #define device_pm_lock() do {} while (0)
@@ -577,10 +573,6 @@ static inline int dpm_suspend_start(pm_message_t state)
 #define suspend_report_result(fn, ret)         do {} while (0)
 
 static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {}
-
-static inline void pm_wakeup_event(struct device *dev, unsigned int msec) {}
-static inline void pm_stay_awake(struct device *dev) {}
-static inline void pm_relax(void) {}
 #endif /* !CONFIG_PM_SLEEP */
 
 /* How to reorder dpm_list after device_move() */
This page took 0.026227 seconds and 5 git commands to generate.