aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2011-05-24 03:06:26 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-05-24 03:06:26 -0400
commitb73077eb03f510a84b102fb97640e595a958403c (patch)
tree8b639000418e2756bf6baece4e00e07d2534bccc /include/linux/pm.h
parent28350e330cfab46b60a1dbf763b678d859f9f3d9 (diff)
parent9d2e173644bb5c42ff1b280fbdda3f195a7cf1f7 (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r--include/linux/pm.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index dd9c7ab38270..512e09177e57 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -267,7 +267,7 @@ const struct dev_pm_ops name = { \
267 * callbacks provided by device drivers supporting both the system sleep PM and 267 * callbacks provided by device drivers supporting both the system sleep PM and
268 * runtime PM, make the pm member point to generic_subsys_pm_ops. 268 * runtime PM, make the pm member point to generic_subsys_pm_ops.
269 */ 269 */
270#ifdef CONFIG_PM_OPS 270#ifdef CONFIG_PM
271extern struct dev_pm_ops generic_subsys_pm_ops; 271extern struct dev_pm_ops generic_subsys_pm_ops;
272#define GENERIC_SUBSYS_PM_OPS (&generic_subsys_pm_ops) 272#define GENERIC_SUBSYS_PM_OPS (&generic_subsys_pm_ops)
273#else 273#else
@@ -431,6 +431,8 @@ struct dev_pm_info {
431 struct list_head entry; 431 struct list_head entry;
432 struct completion completion; 432 struct completion completion;
433 struct wakeup_source *wakeup; 433 struct wakeup_source *wakeup;
434#else
435 unsigned int should_wakeup:1;
434#endif 436#endif
435#ifdef CONFIG_PM_RUNTIME 437#ifdef CONFIG_PM_RUNTIME
436 struct timer_list suspend_timer; 438 struct timer_list suspend_timer;
@@ -463,6 +465,14 @@ struct dev_pm_info {
463 465
464extern void update_pm_runtime_accounting(struct device *dev); 466extern void update_pm_runtime_accounting(struct device *dev);
465 467
468/*
469 * Power domains provide callbacks that are executed during system suspend,
470 * hibernation, system resume and during runtime PM transitions along with
471 * subsystem-level and driver-level callbacks.
472 */
473struct dev_power_domain {
474 struct dev_pm_ops ops;
475};
466 476
467/* 477/*
468 * The PM_EVENT_ messages are also used by drivers implementing the legacy 478 * The PM_EVENT_ messages are also used by drivers implementing the legacy
@@ -519,13 +529,19 @@ extern void update_pm_runtime_accounting(struct device *dev);
519 */ 529 */
520 530
521#ifdef CONFIG_PM_SLEEP 531#ifdef CONFIG_PM_SLEEP
522extern void device_pm_lock(void); 532#ifndef CONFIG_ARCH_NO_SYSDEV_OPS
533extern int sysdev_suspend(pm_message_t state);
523extern int sysdev_resume(void); 534extern int sysdev_resume(void);
535#else
536static inline int sysdev_suspend(pm_message_t state) { return 0; }
537static inline int sysdev_resume(void) { return 0; }
538#endif
539
540extern void device_pm_lock(void);
524extern void dpm_resume_noirq(pm_message_t state); 541extern void dpm_resume_noirq(pm_message_t state);
525extern void dpm_resume_end(pm_message_t state); 542extern void dpm_resume_end(pm_message_t state);
526 543
527extern void device_pm_unlock(void); 544extern void device_pm_unlock(void);
528extern int sysdev_suspend(pm_message_t state);
529extern int dpm_suspend_noirq(pm_message_t state); 545extern int dpm_suspend_noirq(pm_message_t state);
530extern int dpm_suspend_start(pm_message_t state); 546extern int dpm_suspend_start(pm_message_t state);
531 547
@@ -563,15 +579,6 @@ enum dpm_order {
563 DPM_ORDER_DEV_LAST, 579 DPM_ORDER_DEV_LAST,
564}; 580};
565 581
566/*
567 * Global Power Management flags
568 * Used to keep APM and ACPI from both being active
569 */
570extern unsigned int pm_flags;
571
572#define PM_APM 1
573#define PM_ACPI 2
574
575extern int pm_generic_suspend(struct device *dev); 582extern int pm_generic_suspend(struct device *dev);
576extern int pm_generic_resume(struct device *dev); 583extern int pm_generic_resume(struct device *dev);
577extern int pm_generic_freeze(struct device *dev); 584extern int pm_generic_freeze(struct device *dev);