ACPI / PM: Revork the handling of ACPI device wakeup notifications
commitc072530f391e33bd22ed0638c08f07528f154493
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Jul 2014 23:00:45 +0000 (23 01:00 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Jul 2014 23:00:45 +0000 (23 01:00 +0200)
tree559f1730fb64797831086b2e41feded7d72e7226
parent28cb5ef16e578bbca0a562b09f12c8c98ca92720
ACPI / PM: Revork the handling of ACPI device wakeup notifications

Since ACPI wakeup GPEs are going to be enabled during system suspend
as well as for runtime wakeup by a subsequent patch and the same
notify handlers will be used in both cases, rework the ACPI device
wakeup notification framework so that the part specific to physical
devices is always run asynchronously from the PM workqueue.  This
prevents runtime resume callbacks for those devices from being
run during system suspend and resume which may not be appropriate,
among other things.

Also make ACPI device wakeup notification handling a bit more robust
agaist subsequent removal of ACPI device objects, whould that ever
happen, and create a wakeup source object for each ACPI device
configured for wakeup so that wakeup notifications for those
devices can wake up the system from the "freeze" sleep state.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/device_pm.c
drivers/acpi/pci_root.c
drivers/pci/pci-acpi.c
include/acpi/acpi_bus.h
include/linux/pci-acpi.h