diff options
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 */ |
