]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
PCI PM: Introduce function pci_wake_from_d3
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 18 Aug 2008 19:38:00 +0000 (21:38 +0200)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 20 Oct 2008 17:53:41 +0000 (10:53 -0700)
commit0235c4fc7fc6f621dc0dd89eba102ad5aa373390
tree8947ae0efda2a1c9d69f3b6399d3e847307786a5
parent3d137310245e4cdc3e8c8ba1bea2e145a87ae8e3
PCI PM: Introduce function pci_wake_from_d3

Many device drivers use the following sequence of statements to enable
the device to wake up the system while being in the D3_hot or D3_cold
low power state:

        pci_enable_wake(pdev, PCI_D3hot, 1);
        pci_enable_wake(pdev, PCI_D3cold, 1);

However, the second call is not necessary if the first one succeeds (the
ordering of the statements above doesn't matter here) and it may even be
harmful, because we are not supposed to enable PME# after the wake-up
power has been enabled for the device.

To allow drivers to overcome this problem, introduce function
pci_wake_from_d3() that will enable the device to wake up the system
from any of D3_hot and D3_cold as long as the wake-up from at least one
of them is supported.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci.c
include/linux/pci.h