From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 10/12] PCI / ACPI / PM: Platform support for PCI PME wake-up (rev. 6) Date: Wed, 6 Jan 2010 14:04:14 -0800 Message-ID: <20100106140414.6d03cef1__37516.30977863$1262815508$gmane$org@jbarnes-piketon> References: <200912272057.10443.rjw@sisk.pl> <200912272107.36486.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200912272107.36486.rjw@sisk.pl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: "Rafael J. Wysocki" Cc: Oliver@smtp1.linux-foundation.org, Linux PCI , LKML , ACPI Devel Maling List , Shaohua@smtp1.linux-foundation.org, Francois Romieu , pm list , Matthew Garrett List-Id: linux-pm@vger.kernel.org On Sun, 27 Dec 2009 21:07:36 +0100 "Rafael J. Wysocki" wrote: > From: Rafael J. Wysocki > > 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 . > > Signed-off-by: Rafael J. Wysocki Looks pretty good, though my comment about the bool taking functions applies here too. -- Jesse Barnes, Intel Open Source Technology Center