[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0908151143560.18415-100000@netrider.rowland.org>
Date: Sat, 15 Aug 2009 11:53:27 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: "Rafael J. Wysocki" <rjw@...k.pl>
cc: Matthew Garrett <mjg59@...f.ucam.org>, <linux-usb@...r.kernel.org>,
<linux-pci@...r.kernel.org>, Greg KH <gregkh@...e.de>,
LKML <linux-kernel@...r.kernel.org>,
Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>
Subject: Re: [linux-pm] [RFC] PCI: Runtime power management
On Sat, 15 Aug 2009, Rafael J. Wysocki wrote:
> > > Why don't we add a flag indicating whether or not the device is allowed to
> > > be power managed at run time, something like runtime_forbidden, that the
> > > user space will be able to set through sysfs?
> >
> > I think even having a runtime_wakeup flag (which defaults to on) would
> > be sufficient.
>
> Perhaps it would, but then unsetting runtime_wakeup would effectively disable
> runtime PM for devices that need it to be power managed at run time (probably
> all input devices). Also there may be situations in which user space may
> really want to disable runtime PM for some devices (think of broken hardware
> for one example).
It sounds like there are really three choices here, and the decision
should largely be left up to the user:
1. don't use runtime PM,
2. allow runtime PM but disable remote wakeup,
3. allow runtime PM with remote wakeup enabled.
Now, a driver may say "I can't do my job without remote wakeup". Such
a driver would refuse to do runtime_suspend in case 2. But otherwise
we should follow the preference of the user.
The only remaining question is how to expose this in sysfs in a way
that won't be confusing and that won't be confused with the "wakeup"
attribute. One possibility is to use the "level" attribute introduced
in USB; possible levels are "on" (no runtime PM) and "auto" (runtime
PM allowed). Then a new "runtime_wakeup" attribute could contain
nothing (if wakeup is not available), "enabled", or "disabled".
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists