diff options
author | David Brownell <david-b@pacbell.net> | 2007-04-26 03:12:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 13:57:33 -0400 |
commit | 075c1771526c85849ed22298d048bc07e400aee5 (patch) | |
tree | a1579e93b450b0e870a7a65698f9a07bddbfd899 /drivers/base/power/main.c | |
parent | 057f6c019fff9ee290641d50647359bb8898918e (diff) |
define platform wakeup hook, use in pci_enable_wake()
This defines a platform hook to enable/disable a device as a wakeup event
source. It's initially for use with ACPI, but more generally it could be used
whenever enable_irq_wake()/disable_irq_wake() don't suffice.
The hook is called -- if available -- inside pci_enable_wake(); and the
semantics of that call are enhanced so that support for PCI PME# is no longer
needed. It can now work for devices with "legacy PCI PM", when platform
support allows it. (That support would use some board-specific signal for for
the same purpose as PME#.)
[akpm@linux-foundation.org: Make it compile with CONFIG_PM=n]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r-- | drivers/base/power/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index bbbb973a9d3c..05dc8764e765 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -29,6 +29,9 @@ LIST_HEAD(dpm_off_irq); | |||
29 | DECLARE_MUTEX(dpm_sem); | 29 | DECLARE_MUTEX(dpm_sem); |
30 | DECLARE_MUTEX(dpm_list_sem); | 30 | DECLARE_MUTEX(dpm_list_sem); |
31 | 31 | ||
32 | int (*platform_enable_wakeup)(struct device *dev, int is_on); | ||
33 | |||
34 | |||
32 | /** | 35 | /** |
33 | * device_pm_set_parent - Specify power dependency. | 36 | * device_pm_set_parent - Specify power dependency. |
34 | * @dev: Device who needs power. | 37 | * @dev: Device who needs power. |