Re: [PATCH 10/12] PCI / ACPI / PM: Platform support for PCI PMEwake-up (rev. 6)

From: Jesse Barnes
Date: Wed Jan 06 2010 - 17:04:29 EST


On Sun, 27 Dec 2009 21:07:36 +0100
"Rafael J. Wysocki" <rjw@xxxxxxx> wrote:

> From: Rafael J. Wysocki <rjw@xxxxxxx>
>
> Although the majority of PCI devices can generate PMEs that in
> principle may be used to wake up devices suspended at run time,
> platform support is generally necessary to convert PMEs into wake-up
> events that can be delivered to the kernel. If ACPI is used for this
> purpose, a PME generated by a PCI device will trigger the ACPI GPE
> associated with the device to generate an ACPI wake-up event that we
> can set up a handler for, provided that everything is configured
> correctly.
>
> Unfortunately, the subset of PCI devices that have GPEs associated
> with them is quite limited and the other devices have to rely on
> the GPEs associated with their upstream bridges and, possibly, the
> root bridge to generate ACPI wake-up events in response to PMEs from
> them. Moreover, ACPI-based PCI hotplug also uses ACPI notify
> handlers that in general may conflict with the PM notify handlers,
> unless this issue is specifically taken care of.
>
> Add ACPI platform support for PCI PME wake-up:
> o Add a framework making is possible to use ACPI system notify
> handlers for both PM and hotplug at the same time and to take the
> wake-up GPE sharing into account.
> o Add new PCI platform callback ->run_wake() to struct
> pci_platform_pm_ops allowing us to enable/disable the platform to
> generate wake-up events for given device. Implemet this callback
> for the ACPI platform.
> o Define ACPI wake-up handlers for PCI devices and PCI buses and make
> the PCI-ACPI binding code register wake-up notifiers for devices
> associated with wake-up GPEs.
> o Add function pci_dev_run_wake() which can be used by PCI drivers to
> check if given device is capable of generating wake-up events at
> run time.
>
> Developed in cooperation with Matthew Garrett <mjg@xxxxxxxxxx>.
>
> Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>

Looks pretty good, though my comment about the bool taking functions
applies here too.

--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/