5 extern void device_shutdown(void);
15 * Used to synchronize global power management operations.
17 extern struct mutex dpm_mtx
;
20 * Used to serialize changes to the dpm_* lists.
22 extern struct mutex dpm_list_mtx
;
27 extern struct list_head dpm_active
;
28 extern struct list_head dpm_off
;
29 extern struct list_head dpm_off_irq
;
32 static inline struct dev_pm_info
* to_pm_info(struct list_head
* entry
)
34 return container_of(entry
, struct dev_pm_info
, entry
);
37 static inline struct device
*to_device(struct list_head
*entry
)
39 return container_of(to_pm_info(entry
), struct device
, power
);
42 extern void device_pm_add(struct device
*);
43 extern void device_pm_remove(struct device
*);
45 #else /* CONFIG_PM_SLEEP */
47 static inline void device_pm_add(struct device
*dev
)
51 static inline void device_pm_remove(struct device
*dev
)
61 extern int dpm_sysfs_add(struct device
*);
62 extern void dpm_sysfs_remove(struct device
*);
68 extern void dpm_resume(void);
69 extern void dpm_power_up(void);
70 extern int resume_device(struct device
*);
75 extern int suspend_device(struct device
*, pm_message_t
);
79 static inline int dpm_sysfs_add(struct device
*dev
)
84 static inline void dpm_sysfs_remove(struct device
*dev
)