From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH 2/2] platform / ACPI: Attach/detach ACPI PM during probe/remove/shutdown Date: Sun, 25 Nov 2012 20:57:46 +0100 Message-ID: <41045610.NbbIJWgXLK@vostro.rjw.lan> References: <1672179.qgDUs0YdYu@vostro.rjw.lan> <6227446.8xPtqi6yHi@vostro.rjw.lan> <20121125184225.GA1423@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7Bit Return-path: Received: from ogre.sisk.pl ([193.178.161.156]:36530 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753329Ab2KYTxN (ORCPT ); Sun, 25 Nov 2012 14:53:13 -0500 In-Reply-To: <20121125184225.GA1423@kroah.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Greg Kroah-Hartman Cc: LKML , Linux PM list , ACPI Devel Maling List , Zhang Rui , "Svahn, Kai" , Mika Westerberg , Huang Ying , "Lan, Tianyu" , "Zheng, Lv" , Aaron Lu , Grant Likely On Sunday, November 25, 2012 10:42:25 AM Greg Kroah-Hartman wrote: > On Sun, Nov 25, 2012 at 03:58:14PM +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > Drivers usually expect that the devices they are supposed to handle > > will be operational when their .probe() routines are called, but that > > need not be the case on some ACPI-based systems with ACPI-based > > device enumeration where the BIOSes don't put devices into D0 by > > default. To work around this problem it is sufficient to change > > bus type .probe() routines to ensure that devices will be powered > > on before the drivers' .probe() routines run (and their .remove() > > and .shutdown() routines accordingly). > > > > Modify platform_drv_probe() to run acpi_dev_pm_attach() for devices > > whose ACPI handles are present, so that ACPI power management is used > > to change their power states and change their power states to D0 > > before driver probing. Analogously, modify platform_drv_remove() and > > platform_drv_shutdown() to call acpi_dev_pm_detach() for those > > devices, so that they are not subject to ACPI PM any more. > > > > Signed-off-by: Rafael J. Wysocki > > Acked-by: Greg Kroah-Hartman Thanks! -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.