diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-05-24 03:06:26 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-05-24 03:06:26 -0400 |
commit | b73077eb03f510a84b102fb97640e595a958403c (patch) | |
tree | 8b639000418e2756bf6baece4e00e07d2534bccc /include/linux/pm.h | |
parent | 28350e330cfab46b60a1dbf763b678d859f9f3d9 (diff) | |
parent | 9d2e173644bb5c42ff1b280fbdda3f195a7cf1f7 (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r-- | include/linux/pm.h | 31 |
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 |
271 | extern struct dev_pm_ops generic_subsys_pm_ops; | 271 | extern 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 | ||
464 | extern void update_pm_runtime_accounting(struct device *dev); | 466 | extern 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 | */ | ||
473 | struct 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 |
522 | extern void device_pm_lock(void); | 532 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS |
533 | extern int sysdev_suspend(pm_message_t state); | ||
523 | extern int sysdev_resume(void); | 534 | extern int sysdev_resume(void); |
535 | #else | ||
536 | static inline int sysdev_suspend(pm_message_t state) { return 0; } | ||
537 | static inline int sysdev_resume(void) { return 0; } | ||
538 | #endif | ||
539 | |||
540 | extern void device_pm_lock(void); | ||
524 | extern void dpm_resume_noirq(pm_message_t state); | 541 | extern void dpm_resume_noirq(pm_message_t state); |
525 | extern void dpm_resume_end(pm_message_t state); | 542 | extern void dpm_resume_end(pm_message_t state); |
526 | 543 | ||
527 | extern void device_pm_unlock(void); | 544 | extern void device_pm_unlock(void); |
528 | extern int sysdev_suspend(pm_message_t state); | ||
529 | extern int dpm_suspend_noirq(pm_message_t state); | 545 | extern int dpm_suspend_noirq(pm_message_t state); |
530 | extern int dpm_suspend_start(pm_message_t state); | 546 | extern 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 | */ | ||
570 | extern unsigned int pm_flags; | ||
571 | |||
572 | #define PM_APM 1 | ||
573 | #define PM_ACPI 2 | ||
574 | |||
575 | extern int pm_generic_suspend(struct device *dev); | 582 | extern int pm_generic_suspend(struct device *dev); |
576 | extern int pm_generic_resume(struct device *dev); | 583 | extern int pm_generic_resume(struct device *dev); |
577 | extern int pm_generic_freeze(struct device *dev); | 584 | extern int pm_generic_freeze(struct device *dev); |