Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752936Ab0FKPCc (ORCPT ); Fri, 11 Jun 2010 11:02:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57341 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751972Ab0FKPCa (ORCPT ); Fri, 11 Jun 2010 11:02:30 -0400 Subject: Re: [linux-pm] suspend blockers & Android integration From: James Bottomley To: Alan Stern Cc: David Brownell , tytso@mit.edu, Peter Zijlstra , Neil Brown , Brian Swetland , Felipe Balbi , LKML , Florian Mickler , Peter Zijlstra , Thomas Gleixner , Linux PM , Linux OMAP Mailing List , Linus Torvalds , Ingo Molnar , Alan Cox In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 11 Jun 2010 10:02:19 -0500 Message-ID: <1276268539.2862.92.camel@mulgrave.site> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2036 Lines: 47 On Fri, 2010-06-11 at 10:46 -0400, Alan Stern wrote: > On Fri, 11 Jun 2010, James Bottomley wrote: > > > On Thu, 2010-06-10 at 21:21 -0700, David Brownell wrote: > > > Do we at least have a clean way that a driver can > > > reject a system suspend? I've lost track of many > > > issues, but maybe this could be phrased as a QOS > > > constraint: the current config of driver X needs > > > clock Y active to enter the target system suspend > > > state, driver's suspend() method reports as much. Then the entry to > > > that system state gets blocked > > > if the clock isn't enabled. > > > > So in QoS modifications to android patches, the answer is "yes" ... > > except that the current android patch set didn't actually have this type > > of wakelock in it. > > > > Android wants an idleness suspend block (or pm qos constraint) that a > > driver can set to prevent the system idleness power govenor from > > dropping into a power state too low for the driver, so in USB terms this > > would prevent the states that shut down the clock. For android, it > > prevented shutdown of an internal i2c bus. > > > > The one thing that does look difficult is that these power constraints > > are device (and sometimes SoC) specific. Expressing them in a generic > > way for the cpu govenors to make sense of might be hard. > > Doesn't the clock framework already handle this sort of thing? Well, there are two elements to "this sort of thing": 1. Allow a driver to request that a given clock not be turned off. 2. Make the cpuidle governors aware of a pending "don't turn off X clock source" so they can keep the system in a state where the clock doesn't get powered down. As far as I can tell from the code, neither currently exists at the moment. James -- 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/