Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262267AbVAEIuV (ORCPT ); Wed, 5 Jan 2005 03:50:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262292AbVAEIuU (ORCPT ); Wed, 5 Jan 2005 03:50:20 -0500 Received: from gprs215-128.eurotel.cz ([160.218.215.128]:59265 "EHLO amd.ucw.cz") by vger.kernel.org with ESMTP id S262267AbVAEIuN (ORCPT ); Wed, 5 Jan 2005 03:50:13 -0500 Date: Wed, 5 Jan 2005 09:49:54 +0100 From: Pavel Machek To: Li Shaohua Cc: ACPI-DEV , lkml , Len Brown , Greg , Patrick Mochel Subject: Re: [PATCH 4/4]An ACPI callback for pci_set_power_state Message-ID: <20050105084954.GA5170@elf.ucw.cz> References: <1104893456.5550.135.camel@sli10-desk.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1104893456.5550.135.camel@sli10-desk.sh.intel.com> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.6+20040722i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1427 Lines: 32 Hi! > This is an ACPI callback for pci_set_power_state. Besides setting PCI > config space, changing device's power state sometimes requires to power > on device's power source and to invoke other firmware methods. > diff -puN drivers/pci/pci.h~acpi-pci-set-power-state-callback drivers/pci/pci.h > --- 2.5/drivers/pci/pci.h~acpi-pci-set-power-state-callback 2005-01-05 09:58:06.469923128 +0800 > +++ 2.5-root/drivers/pci/pci.h 2005-01-05 09:58:06.473922520 +0800 > @@ -13,6 +13,7 @@ extern int pci_bus_alloc_resource(struct > void *alignf_data); > /* Firmware callbacks */ > extern int (*platform_pci_get_suspend_state)(struct device *dev, u32 state); > +extern int (*platform_pci_set_power_state)(struct pci_dev *dev, int state); What kind of state is passed here? Why is it u32 in one case and int in the second one? I'm about to introduce separate types for pci power states and system power states; could you at least add comments which states are which? Also few lines of documentation would be very usefull... Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/