From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [RFC][PATCH] Power domains for platform bus type Date: Mon, 31 Jan 2011 20:18:44 -0700 Message-ID: References: <201101300107.19389.rjw@sisk.pl> <20110131225902.GD27856@angua.secretlab.ca> <201102010010.46096.rjw@sisk.pl> <871v3s3ahe.fsf@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <871v3s3ahe.fsf@ti.com> 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: Kevin Hilman Cc: LKML , Linux-pm mailing list List-Id: linux-pm@vger.kernel.org On Mon, Jan 31, 2011 at 4:43 PM, Kevin Hilman wrote: > "Rafael J. Wysocki" writes: > >>> Also, what is the use case for having 2 sets of power_domain ops? =A0My >>> gut tells me that you'd only want to do post ops on the >>> {freeze,suspend,poweroff} path and pre ops on the {resume,thaw,restore} >>> path. =A0It seems overly engineered to me, but I may be missing >>> something fundamental. >> >> Well, that's a part of the RFC, actually. :-) >> >> For the subsystems I've worked with (PCI, ACPI, PNP to some extent) one = set >> would be sufficient, but I don't know of every possible use case. > > For the on-chip SoC devices we're managing with OMAP, we're currently > only using one set: post ops on [runtime_]suspend and pre ops on > [runtime_]resume. > > However, I could imagine (at least conceptually) using the pre ops on > suspend to do some constraints checking and/or possibly some > management/notification of dependent devices. =A0Another possiblity > (although possibly racy) would be using the pre ops on suspend to > initiate some high-latency operations. > > I guess the main problem with two sets is wasted space. =A0e.g, if I move > OMAP to this (already hacking on it) there will be only 2 functions used > in post ops: [runtime_]suspend() and 2 used in pre ops [runtime_]_resume(= ). There's a conceptual load added to the (human) reader too. Every additional hook point is an additional piece other engineers need to fit into their mental model. I'm resistant to having the two sets of ops without a definite use case for it when conceptually I can only imagine a need for one set. g.