mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Merge branches 'pm-runtime' and 'pm-sleep'
* pm-runtime: PM / Runtime: Update runtime_idle() documentation for return value meaning * pm-sleep: PM / sleep: Correct whitespace errors in <linux/pm.h> PM: Add missing "freeze" state PM / Hibernate: Spelling s/anonymouns/anonymous/ PM / Runtime: Add missing "it" in comment PM / suspend: Remove unnecessary !! PCI / PM: Resume runtime-suspended devices later during system suspend ACPI / PM: Resume runtime-suspended devices later during system suspend PM / sleep: Set pm_generic functions to NULL for !CONFIG_PM_SLEEP PM: fix typo in comment PM / hibernate: use name_to_dev_t to parse resume PM / wakeup: Include appropriate header file in kernel/power/wakelock.c PM / sleep: Move prototype declaration to header file kernel/power/power.h PM / sleep: Asynchronous threads for suspend_late PM / sleep: Asynchronous threads for suspend_noirq PM / sleep: Asynchronous threads for resume_early PM / sleep: Asynchronous threads for resume_noirq PM / sleep: Two flags for async suspend_noirq and suspend_late
This commit is contained in:
@@ -264,9 +264,9 @@ typedef struct pm_message {
|
||||
* registers, so that it is fully operational.
|
||||
*
|
||||
* @runtime_idle: Device appears to be inactive and it might be put into a
|
||||
* low-power state if all of the necessary conditions are satisfied. Check
|
||||
* these conditions and handle the device as appropriate, possibly queueing
|
||||
* a suspend request for it. The return value is ignored by the PM core.
|
||||
* low-power state if all of the necessary conditions are satisfied.
|
||||
* Check these conditions, and return 0 if it's appropriate to let the PM
|
||||
* core queue a suspend request for the device.
|
||||
*
|
||||
* Refer to Documentation/power/runtime_pm.txt for more information about the
|
||||
* role of the above callbacks in device runtime power management.
|
||||
@@ -352,7 +352,7 @@ const struct dev_pm_ops name = { \
|
||||
|
||||
/*
|
||||
* Use this for defining a set of PM operations to be used in all situations
|
||||
* (sustem suspend, hibernation or runtime PM).
|
||||
* (system suspend, hibernation or runtime PM).
|
||||
* NOTE: In general, system suspend callbacks, .suspend() and .resume(), should
|
||||
* be different from the corresponding runtime PM callbacks, .runtime_suspend(),
|
||||
* and .runtime_resume(), because .runtime_suspend() always works on an already
|
||||
@@ -379,7 +379,7 @@ const struct dev_pm_ops name = { \
|
||||
*
|
||||
* ON No transition.
|
||||
*
|
||||
* FREEZE System is going to hibernate, call ->prepare() and ->freeze()
|
||||
* FREEZE System is going to hibernate, call ->prepare() and ->freeze()
|
||||
* for all devices.
|
||||
*
|
||||
* SUSPEND System is going to suspend, call ->prepare() and ->suspend()
|
||||
@@ -423,7 +423,7 @@ const struct dev_pm_ops name = { \
|
||||
|
||||
#define PM_EVENT_INVALID (-1)
|
||||
#define PM_EVENT_ON 0x0000
|
||||
#define PM_EVENT_FREEZE 0x0001
|
||||
#define PM_EVENT_FREEZE 0x0001
|
||||
#define PM_EVENT_SUSPEND 0x0002
|
||||
#define PM_EVENT_HIBERNATE 0x0004
|
||||
#define PM_EVENT_QUIESCE 0x0008
|
||||
@@ -542,6 +542,8 @@ struct dev_pm_info {
|
||||
unsigned int async_suspend:1;
|
||||
bool is_prepared:1; /* Owned by the PM core */
|
||||
bool is_suspended:1; /* Ditto */
|
||||
bool is_noirq_suspended:1;
|
||||
bool is_late_suspended:1;
|
||||
bool ignore_children:1;
|
||||
bool early_init:1; /* Owned by the PM core */
|
||||
spinlock_t lock;
|
||||
@@ -613,11 +615,11 @@ struct dev_pm_domain {
|
||||
* message is implicit:
|
||||
*
|
||||
* ON Driver starts working again, responding to hardware events
|
||||
* and software requests. The hardware may have gone through
|
||||
* a power-off reset, or it may have maintained state from the
|
||||
* previous suspend() which the driver will rely on while
|
||||
* resuming. On most platforms, there are no restrictions on
|
||||
* availability of resources like clocks during resume().
|
||||
* and software requests. The hardware may have gone through
|
||||
* a power-off reset, or it may have maintained state from the
|
||||
* previous suspend() which the driver will rely on while
|
||||
* resuming. On most platforms, there are no restrictions on
|
||||
* availability of resources like clocks during resume().
|
||||
*
|
||||
* Other transitions are triggered by messages sent using suspend(). All
|
||||
* these transitions quiesce the driver, so that I/O queues are inactive.
|
||||
@@ -627,21 +629,21 @@ struct dev_pm_domain {
|
||||
* differ according to the message:
|
||||
*
|
||||
* SUSPEND Quiesce, enter a low power device state appropriate for
|
||||
* the upcoming system state (such as PCI_D3hot), and enable
|
||||
* wakeup events as appropriate.
|
||||
* the upcoming system state (such as PCI_D3hot), and enable
|
||||
* wakeup events as appropriate.
|
||||
*
|
||||
* HIBERNATE Enter a low power device state appropriate for the hibernation
|
||||
* state (eg. ACPI S4) and enable wakeup events as appropriate.
|
||||
* state (eg. ACPI S4) and enable wakeup events as appropriate.
|
||||
*
|
||||
* FREEZE Quiesce operations so that a consistent image can be saved;
|
||||
* but do NOT otherwise enter a low power device state, and do
|
||||
* NOT emit system wakeup events.
|
||||
* but do NOT otherwise enter a low power device state, and do
|
||||
* NOT emit system wakeup events.
|
||||
*
|
||||
* PRETHAW Quiesce as if for FREEZE; additionally, prepare for restoring
|
||||
* the system from a snapshot taken after an earlier FREEZE.
|
||||
* Some drivers will need to reset their hardware state instead
|
||||
* of preserving it, to ensure that it's never mistaken for the
|
||||
* state which that earlier snapshot had set up.
|
||||
* the system from a snapshot taken after an earlier FREEZE.
|
||||
* Some drivers will need to reset their hardware state instead
|
||||
* of preserving it, to ensure that it's never mistaken for the
|
||||
* state which that earlier snapshot had set up.
|
||||
*
|
||||
* A minimally power-aware driver treats all messages as SUSPEND, fully
|
||||
* reinitializes its device during resume() -- whether or not it was reset
|
||||
@@ -718,14 +720,26 @@ static inline void dpm_for_each_dev(void *data, void (*fn)(struct device *, void
|
||||
{
|
||||
}
|
||||
|
||||
#define pm_generic_prepare NULL
|
||||
#define pm_generic_suspend NULL
|
||||
#define pm_generic_resume NULL
|
||||
#define pm_generic_freeze NULL
|
||||
#define pm_generic_thaw NULL
|
||||
#define pm_generic_restore NULL
|
||||
#define pm_generic_poweroff NULL
|
||||
#define pm_generic_complete NULL
|
||||
#define pm_generic_prepare NULL
|
||||
#define pm_generic_suspend_late NULL
|
||||
#define pm_generic_suspend_noirq NULL
|
||||
#define pm_generic_suspend NULL
|
||||
#define pm_generic_resume_early NULL
|
||||
#define pm_generic_resume_noirq NULL
|
||||
#define pm_generic_resume NULL
|
||||
#define pm_generic_freeze_noirq NULL
|
||||
#define pm_generic_freeze_late NULL
|
||||
#define pm_generic_freeze NULL
|
||||
#define pm_generic_thaw_noirq NULL
|
||||
#define pm_generic_thaw_early NULL
|
||||
#define pm_generic_thaw NULL
|
||||
#define pm_generic_restore_noirq NULL
|
||||
#define pm_generic_restore_early NULL
|
||||
#define pm_generic_restore NULL
|
||||
#define pm_generic_poweroff_noirq NULL
|
||||
#define pm_generic_poweroff_late NULL
|
||||
#define pm_generic_poweroff NULL
|
||||
#define pm_generic_complete NULL
|
||||
#endif /* !CONFIG_PM_SLEEP */
|
||||
|
||||
/* How to reorder dpm_list after device_move() */
|
||||
|
Reference in New Issue
Block a user