From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [RFC][PATCH 00/11] Android PM extensions Date: Mon, 2 Feb 2009 12:49:26 +0100 Message-ID: <20090202114926.GD4631@elf.ucw.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: 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: Arve Hj?nnev?g Cc: swetland@google.com, Nigel Cunningham , linux-pm@lists.linux-foundation.org List-Id: linux-pm@vger.kernel.org Hi! > User-space API > ============== > > Write "lockname" or "lockname timeout" to /sys/power/wake_lock lock and if > needed create a wakelock. The timeout here is specified nanoseconds. > Write "lockname" to /sys/power/wake_unlock to unlock a user wakelock. > > Do not use randomly generated wakelock names as there is no api to free > a user-space wakelock. Do you have some examples of user wakelocks? The API is quite ugly; creating objects by writing to file. If userspace does not want system to suspend, could it simply write "on" to /sys/power/state ? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html