Skip to content

Commit

Permalink
PCI/ACPI: Notify PCI devices when their power resource is turned on
Browse files Browse the repository at this point in the history
This patch reduces power consumption by allowing idle devices to go to a
low power state after another device on the same power resource has been
awakened.

A power resource may be shared by multiple devices.  When all devices
sharing a power resource are put into D3_COLD state, the power resource
will be turned off.  When one of the devices is awakened, the power
resource will be turned on and all devices sharing it will be powered on to
D0uninitialized state.  These devices should be resumed, so that they have
the opportunity to go to low power state later.

[bhelgaas: changelog]
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Huang Ying authored and Bjorn Helgaas committed Nov 13, 2012
1 parent eba48cd commit 71fbad6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/acpi/pci_bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ static int acpi_pci_unbind(struct acpi_device *device)

device_set_run_wake(&dev->dev, false);
pci_acpi_remove_pm_notifier(device);
acpi_power_resource_unregister_device(&dev->dev, device->handle);

if (!dev->subordinate)
goto out;
Expand All @@ -71,6 +72,7 @@ static int acpi_pci_bind(struct acpi_device *device)
return 0;

pci_acpi_add_pm_notifier(device, dev);
acpi_power_resource_register_device(&dev->dev, device->handle);
if (device->wakeup.flags.run_wake)
device_set_run_wake(&dev->dev, true);

Expand Down

0 comments on commit 71fbad6

Please sign in to comment.