15 extern int device_detach_shutdown(struct device
*);
16 extern void device_shutdown(void);
26 * Used to synchronize global power management operations.
28 extern struct semaphore dpm_sem
;
31 * Used to serialize changes to the dpm_* lists.
33 extern struct semaphore dpm_list_sem
;
38 extern struct list_head dpm_active
;
39 extern struct list_head dpm_off
;
40 extern struct list_head dpm_off_irq
;
43 static inline struct dev_pm_info
* to_pm_info(struct list_head
* entry
)
45 return container_of(entry
, struct dev_pm_info
, entry
);
48 static inline struct device
* to_device(struct list_head
* entry
)
50 return container_of(to_pm_info(entry
), struct device
, power
);
53 extern int device_pm_add(struct device
*);
54 extern void device_pm_remove(struct device
*);
60 extern int dpm_sysfs_add(struct device
*);
61 extern void dpm_sysfs_remove(struct device
*);
67 extern void dpm_resume(void);
68 extern void dpm_power_up(void);
69 extern int resume_device(struct device
*);
74 extern int suspend_device(struct device
*, pm_message_t
);
81 extern int dpm_runtime_suspend(struct device
*, pm_message_t
);
82 extern void dpm_runtime_resume(struct device
*);
87 static inline int device_pm_add(struct device
* dev
)
91 static inline void device_pm_remove(struct device
* dev
)
96 static inline int dpm_runtime_suspend(struct device
* dev
, pm_message_t state
)
101 static inline void dpm_runtime_resume(struct device
* dev
)