On Mon, 26 Feb 2007, Oliver Neukum wrote:

> > It just doesn't seem like a useful capability.  What harm will it do to 
> > suspend a USB device after 1 second rather than right away?  It's hard to
> 
> What harm will the opposite do? User settings exist to let the user do
> as he pleases. Embedded people would use it.

Okay.  I guess if the user wants to set things up so they behave weirdly, 
we can allow him to do so.

Next you'll be saying that people will want to specify the delay more 
precisely than the nearest second...

> > imagine a situation where you would really want to do that.
> > 
> > In addition it gives us a useful way to represent no autosuspend (although
> > I suppose we could use negative delay values for that purpose).
> 
> We shouldn't. The clean way to do this is to have a boolean setting.

Not so.  The collection of possible settings is

        {autosuspend immediately, autosuspend after 1 second,
         autosuspend after 2 seconds, ..., autosuspend never}.

It isn't

        {do autosuspend, don't autosuspend} x {autosuspend 
                immediately, autosuspend after 1 second, autosuspend
                after 2 seconds, ...}.

Logically speaking, we should represent "no autosuspend" by setting the 
delay value to infinity.  Using a negative number instead seems somewhat 
easier.  :-)

> To elaborate a bit. You wanted to introduce a capability to suspend
> a device immediately, but without regard to its willingness to autosuspend.
> However the device was to always wake up on demand. It seems to me that
> this is indistinguishable from an autosuspend with zero delay.

It isn't indistinguishable.  There is a very real difference: The 
capability I wanted to introduce would operate only when userspace makes a 
specific request.  Autosuspend with zero delay would operate autonomously 
with no user intervention, once the delay is set.

Or did I misunderstand your point?  Waking up on demand is distinguishable
from autosuspend with zero delay because autosuspend is merely an
optimization (improved power usage), whereas waking up is necessary for
proper functioning.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to