Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756302Ab1DMORq (ORCPT ); Wed, 13 Apr 2011 10:17:46 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:49781 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752901Ab1DMORp (ORCPT ); Wed, 13 Apr 2011 10:17:45 -0400 Date: Wed, 13 Apr 2011 10:17:41 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Rafael J. Wysocki" cc: Linux PM mailing list , Kevin Hilman , LKML , Grant Likely , Len Brown , , , Magnus Damm Subject: Re: [RFC][PATCH] PM: Make power domain callbacks take precedence over subsystem ones In-Reply-To: <201104130205.26988.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: 2038 Lines: 43 On Wed, 13 Apr 2011, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Change the PM core's behavior related to power domains in such a way > that, if a power domain is defined for a given device, its callbacks > will be executed instead of and not in addition to the device > subsystem's PM callbacks. > > The idea behind the initial implementation of power domains handling > by the PM core was that power domain callbacks would be executed in > addition to subsystem callbacks, so that it would be possible to > extend the subsystem callbacks by using power domains. It turns out, > however, that this wouldn't be really convenient in some important > situations. > > For example, there are systems in which power can only be removed > from entire power domains. On those systems it is not desirable to > execute device drivers' PM callbacks until it is known that power is > going to be removed from the devices in question, which means that > they should be executed by power domain callbacks rather then by > subsystem (e.g. bus type) PM callbacks, because subsystems generally > have no information about what devices belong to which power domain. > Thus, for instance, if the bus type in question is the platform bus > type, its PM callbacks generally should not be called in addition to > power domain callbacks, because they run device drivers' callbacks > unconditionally if defined. What about systems where it makes sense to execute the subsystem callbacks even if power isn't going to be removed from the device? It's quite possible that the subsystem could reduce the device's power consumption even when the device isn't powered down completely. Is the extra overhead of invoking the subsystem callback really all that troublesome? 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/