[MIPS] RTLX: Protect rtlx_{read,write} with mutex.
[linux-2.6/linux-mips/linux-dm7025.git] / drivers / base / power / power.h
blobfb3d35a9e101582563b357848617cd7539e65e3a
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 #else /* CONFIG_PM */
73 static inline int device_pm_add(struct device * dev)
75 return 0;
77 static inline void device_pm_remove(struct device * dev)
82 #endif