Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932244AbWAEWGs (ORCPT ); Thu, 5 Jan 2006 17:06:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932246AbWAEWGr (ORCPT ); Thu, 5 Jan 2006 17:06:47 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:59079 "HELO iolanthe.rowland.org") by vger.kernel.org with SMTP id S932244AbWAEWGq (ORCPT ); Thu, 5 Jan 2006 17:06:46 -0500 Date: Thu, 5 Jan 2006 17:06:45 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Patrick Mochel cc: Pavel Machek , Andrew Morton , Linux-pm mailing list , kernel list Subject: Re: [linux-pm] [patch] pm: fix runtime powermanagement's /sys interface In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1875 Lines: 43 On Thu, 5 Jan 2006, Patrick Mochel wrote: > > It would be good to make the details available so that they are there when > > needed. For instance, we might export "D0", "on", "D1", "D2", "D3", and > > "suspend", treating "on" as a synonym for "D0" and "suspend" as a synonym > > for "D3". > > Do it in userspace; the kernel doesn't need to know about "on" or > "suspend". It should just validate and forward requests to enter specific > states. The problem is that the set of devices, drivers, and states is not bounded. A single userspace tool might not know about all the device-specific states some weird driver supports. The tool should still be able to ask the kernel to suspend the device without needing to know exactly which device state corresponds to "suspended". On Thu, 5 Jan 2006, Pavel Machek wrote: > Its okay with me to add more states _when they are needed_. Just now, > many drivers do not even handle system suspend/resume correctly. > We are not adding random crap to kernel just because "someone may need > it". And yes, having aliases counts as "random crap". Perfectly legal > but totally useless things count as a random crap, too. > > Bring example hardware that needs more than two states, implement > driver support for that, and then we can talk about adding more than > two states into core code. Embedded devices are a great example. Consider putting Linux on a portable phone. The individual components can have many different power states, depending on which clock and power lines are enabled. "on" and "suspend" won't be sufficient to handle the vendor's needs. 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/