diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:14:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:14:53 -0500 |
commit | c8940eca75e6d1ea57f6c491a30bd1023c64c9ad (patch) | |
tree | d68944ab9fa8ba3c77b18edc2bd836c7e355b23e /include/linux/pm.h | |
parent | 78c92a9fd4b6abbbc1fe1ec335c697cb4e63f252 (diff) | |
parent | 3ae22e8c8ac39daf88ae32f047fb23825be7c646 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
spi / PM: Support dev_pm_ops
PM: Prototype the pm_generic_ operations
PM / Runtime: Generic resume shouldn't set RPM_ACTIVE unconditionally
PM: Use dev_name() in core device suspend and resume routines
PM: Permit registration of parentless devices during system suspend
PM: Replace the device power.status field with a bit field
PM: Remove redundant checks from core device resume routines
PM: Use a different list of devices for each stage of device suspend
PM: Avoid compiler warning in pm_noirq_op()
PM: Use pm_wakeup_pending() in __device_suspend()
PM / Wakeup: Replace pm_check_wakeup_events() with pm_wakeup_pending()
PM: Prevent dpm_prepare() from returning errors unnecessarily
PM: Fix references to basic-pm-debugging.txt in drivers-testing.txt
PM / Runtime: Add synchronous runtime interface for interrupt handlers (v3)
PM / Hibernate: When failed, in_suspend should be reset
PM / Hibernate: hibernation_ops->leave should be checked too
Freezer: Fix a race during freezing of TASK_STOPPED tasks
PM: Use proper ccflag flag in kernel/power/Makefile
PM / Runtime: Fix comments to match runtime callback code
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r-- | include/linux/pm.h | 51 |
1 files changed, 10 insertions, 41 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index 40f3f45702ba..dd9c7ab38270 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -367,45 +367,6 @@ extern struct dev_pm_ops generic_subsys_pm_ops; | |||
367 | { .event = PM_EVENT_AUTO_RESUME, }) | 367 | { .event = PM_EVENT_AUTO_RESUME, }) |
368 | 368 | ||
369 | /** | 369 | /** |
370 | * Device power management states | ||
371 | * | ||
372 | * These state labels are used internally by the PM core to indicate the current | ||
373 | * status of a device with respect to the PM core operations. | ||
374 | * | ||
375 | * DPM_ON Device is regarded as operational. Set this way | ||
376 | * initially and when ->complete() is about to be called. | ||
377 | * Also set when ->prepare() fails. | ||
378 | * | ||
379 | * DPM_PREPARING Device is going to be prepared for a PM transition. Set | ||
380 | * when ->prepare() is about to be called. | ||
381 | * | ||
382 | * DPM_RESUMING Device is going to be resumed. Set when ->resume(), | ||
383 | * ->thaw(), or ->restore() is about to be called. | ||
384 | * | ||
385 | * DPM_SUSPENDING Device has been prepared for a power transition. Set | ||
386 | * when ->prepare() has just succeeded. | ||
387 | * | ||
388 | * DPM_OFF Device is regarded as inactive. Set immediately after | ||
389 | * ->suspend(), ->freeze(), or ->poweroff() has succeeded. | ||
390 | * Also set when ->resume()_noirq, ->thaw_noirq(), or | ||
391 | * ->restore_noirq() is about to be called. | ||
392 | * | ||
393 | * DPM_OFF_IRQ Device is in a "deep sleep". Set immediately after | ||
394 | * ->suspend_noirq(), ->freeze_noirq(), or | ||
395 | * ->poweroff_noirq() has just succeeded. | ||
396 | */ | ||
397 | |||
398 | enum dpm_state { | ||
399 | DPM_INVALID, | ||
400 | DPM_ON, | ||
401 | DPM_PREPARING, | ||
402 | DPM_RESUMING, | ||
403 | DPM_SUSPENDING, | ||
404 | DPM_OFF, | ||
405 | DPM_OFF_IRQ, | ||
406 | }; | ||
407 | |||
408 | /** | ||
409 | * Device run-time power management status. | 370 | * Device run-time power management status. |
410 | * | 371 | * |
411 | * These status labels are used internally by the PM core to indicate the | 372 | * These status labels are used internally by the PM core to indicate the |
@@ -463,8 +424,8 @@ struct wakeup_source; | |||
463 | struct dev_pm_info { | 424 | struct dev_pm_info { |
464 | pm_message_t power_state; | 425 | pm_message_t power_state; |
465 | unsigned int can_wakeup:1; | 426 | unsigned int can_wakeup:1; |
466 | unsigned async_suspend:1; | 427 | unsigned int async_suspend:1; |
467 | enum dpm_state status; /* Owned by the PM core */ | 428 | unsigned int in_suspend:1; /* Owned by the PM core */ |
468 | spinlock_t lock; | 429 | spinlock_t lock; |
469 | #ifdef CONFIG_PM_SLEEP | 430 | #ifdef CONFIG_PM_SLEEP |
470 | struct list_head entry; | 431 | struct list_head entry; |
@@ -486,6 +447,7 @@ struct dev_pm_info { | |||
486 | unsigned int run_wake:1; | 447 | unsigned int run_wake:1; |
487 | unsigned int runtime_auto:1; | 448 | unsigned int runtime_auto:1; |
488 | unsigned int no_callbacks:1; | 449 | unsigned int no_callbacks:1; |
450 | unsigned int irq_safe:1; | ||
489 | unsigned int use_autosuspend:1; | 451 | unsigned int use_autosuspend:1; |
490 | unsigned int timer_autosuspends:1; | 452 | unsigned int timer_autosuspends:1; |
491 | enum rpm_request request; | 453 | enum rpm_request request; |
@@ -610,4 +572,11 @@ extern unsigned int pm_flags; | |||
610 | #define PM_APM 1 | 572 | #define PM_APM 1 |
611 | #define PM_ACPI 2 | 573 | #define PM_ACPI 2 |
612 | 574 | ||
575 | extern int pm_generic_suspend(struct device *dev); | ||
576 | extern int pm_generic_resume(struct device *dev); | ||
577 | extern int pm_generic_freeze(struct device *dev); | ||
578 | extern int pm_generic_thaw(struct device *dev); | ||
579 | extern int pm_generic_restore(struct device *dev); | ||
580 | extern int pm_generic_poweroff(struct device *dev); | ||
581 | |||
613 | #endif /* _LINUX_PM_H */ | 582 | #endif /* _LINUX_PM_H */ |