Merge branch 'pm-sleep'
* pm-sleep: PM / hibernate: fix a comment typo input: i8042: Avoid resetting controller on system suspend/resume PM / PCI / ACPI: Kick devices that might have been reset by firmware PM / sleep: Add flags to indicate platform firmware involvement PM / sleep: Drop pm_request_idle() from pm_generic_complete() PCI / PM: Avoid resuming more devices during system suspend PM / wakeup: wakeup_source_create: use kstrdup_const PM / sleep: Report interrupt that caused system wakeup
This commit is contained in:
@@ -21,7 +21,7 @@ bool irq_pm_check_wakeup(struct irq_desc *desc)
|
||||
desc->istate |= IRQS_SUSPENDED | IRQS_PENDING;
|
||||
desc->depth++;
|
||||
irq_disable(desc);
|
||||
pm_system_wakeup();
|
||||
pm_system_irq_wakeup(irq_desc_get_irq(desc));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@@ -733,7 +733,7 @@ int hibernate(void)
|
||||
* contents of memory is restored from the saved image.
|
||||
*
|
||||
* If this is successful, control reappears in the restored target kernel in
|
||||
* hibernation_snaphot() which returns to hibernate(). Otherwise, the routine
|
||||
* hibernation_snapshot() which returns to hibernate(). Otherwise, the routine
|
||||
* attempts to recover gracefully and make the kernel return to the normal mode
|
||||
* of operation.
|
||||
*/
|
||||
|
@@ -272,6 +272,22 @@ static inline void pm_print_times_init(void)
|
||||
{
|
||||
pm_print_times_enabled = !!initcall_debug;
|
||||
}
|
||||
|
||||
static ssize_t pm_wakeup_irq_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return pm_wakeup_irq ? sprintf(buf, "%u\n", pm_wakeup_irq) : -ENODATA;
|
||||
}
|
||||
|
||||
static ssize_t pm_wakeup_irq_store(struct kobject *kobj,
|
||||
struct kobj_attribute *attr,
|
||||
const char *buf, size_t n)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
power_attr(pm_wakeup_irq);
|
||||
|
||||
#else /* !CONFIG_PM_SLEEP_DEBUG */
|
||||
static inline void pm_print_times_init(void) {}
|
||||
#endif /* CONFIG_PM_SLEEP_DEBUG */
|
||||
@@ -604,6 +620,7 @@ static struct attribute * g[] = {
|
||||
#endif
|
||||
#ifdef CONFIG_PM_SLEEP_DEBUG
|
||||
&pm_print_times_attr.attr,
|
||||
&pm_wakeup_irq_attr.attr,
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_FREEZER
|
||||
|
@@ -35,6 +35,9 @@
|
||||
const char *pm_labels[] = { "mem", "standby", "freeze", NULL };
|
||||
const char *pm_states[PM_SUSPEND_MAX];
|
||||
|
||||
unsigned int pm_suspend_global_flags;
|
||||
EXPORT_SYMBOL_GPL(pm_suspend_global_flags);
|
||||
|
||||
static const struct platform_suspend_ops *suspend_ops;
|
||||
static const struct platform_freeze_ops *freeze_ops;
|
||||
static DECLARE_WAIT_QUEUE_HEAD(suspend_freeze_wait_head);
|
||||
@@ -493,6 +496,7 @@ static int enter_state(suspend_state_t state)
|
||||
#endif
|
||||
|
||||
pr_debug("PM: Preparing system for sleep (%s)\n", pm_states[state]);
|
||||
pm_suspend_clear_flags();
|
||||
error = suspend_prepare(state);
|
||||
if (error)
|
||||
goto Unlock;
|
||||
|
Viittaa uudesa ongelmassa
Block a user