[PATCH] Driver Core: remove driver model detach_state
[linux-2.6/verdex.git] / drivers / base / power / power.h
blob2e700d795cf15033c933e4a1a71a4d73afa59a14
1 /*
2 * shutdown.c
3 */
5 extern void device_shutdown(void);
8 #ifdef CONFIG_PM
11 * main.c
15 * Used to synchronize global power management operations.
17 extern struct semaphore dpm_sem;
20 * Used to serialize changes to the dpm_* lists.
22 extern struct semaphore dpm_list_sem;
25 * The PM lists.
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 int device_pm_add(struct device *);
43 extern void device_pm_remove(struct device *);
46 * sysfs.c
49 extern int dpm_sysfs_add(struct device *);
50 extern void dpm_sysfs_remove(struct device *);
53 * resume.c
56 extern void dpm_resume(void);
57 extern void dpm_power_up(void);
58 extern int resume_device(struct device *);
61 * suspend.c
63 extern int suspend_device(struct device *, pm_message_t);
67 * runtime.c
70 extern int dpm_runtime_suspend(struct device *, pm_message_t);
71 extern void dpm_runtime_resume(struct device *);
73 #else /* CONFIG_PM */
76 static inline int device_pm_add(struct device * dev)
78 return 0;
80 static inline void device_pm_remove(struct device * dev)
85 static inline int dpm_runtime_suspend(struct device * dev, pm_message_t state)
87 return 0;
90 static inline void dpm_runtime_resume(struct device * dev)
95 #endif