Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755909Ab0AVDCa (ORCPT ); Thu, 21 Jan 2010 22:02:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753302Ab0AVDC3 (ORCPT ); Thu, 21 Jan 2010 22:02:29 -0500 Received: from netrider.rowland.org ([192.131.102.5]:60861 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752262Ab0AVDC3 (ORCPT ); Thu, 21 Jan 2010 22:02:29 -0500 Date: Thu, 21 Jan 2010 22:02:26 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: "Rafael J. Wysocki" cc: pm list , LKML , Jesse Barnes , Matthew Garrett , Greg KH Subject: Re: [PATCH 1/2] PM / Runtime: Add sysfs switch for disabling device run-time PM (rev. 2) In-Reply-To: <201001212359.38886.rjw@sisk.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1497 Lines: 38 On Thu, 21 Jan 2010, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Add new device sysfs attribute, power/control, allowing the user > space to block the run-time power management of devices. If this > attribute is set to "on", the driver of the device won't be able to power > manage it at run time (without breaking the rules) and the device will > always be in the full power state (except when the entire system goes > into a sleep state). ... > --- linux-2.6.orig/drivers/base/power/power.h > +++ linux-2.6/drivers/base/power/power.h > @@ -2,11 +2,15 @@ > > extern void pm_runtime_init(struct device *dev); > extern void pm_runtime_remove(struct device *dev); > +extern void pm_runtime_allow(struct device *dev); > +extern void pm_runtime_forbid(struct device *dev); Can you write a follow-up patch that moves these declarations to a public header file like include/linux/pm_runtime.h and EXPORTs the two new routines? It is sometimes useful for drivers to be able to call the routines directly. For example, we disable runtime PM for most USB devices by default. But a few drivers may know that their devices are able to handle it, so they want to change the default setting when they are bound. Alan Stern -- 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/