Re: [linux-usb-devel] error to be returned while suspended

Alan Stern
2006-10-05T21:46:06Z

On Thu, 5 Oct 2006, Oliver Neukum wrote:

> I have a few observations, but no solution either:
> - if root tells a device to suspend, it shall do so

Probably everyone will agree on that.

> - the issues of manual & automatic suspend and remote wakeup are orthogonal

Except for the fact that remote wakeup kicks in only when a device is
suspended.

> - there should be a common API for all devices

It would be nice, wouldn't it? But we _already_ have several vastly
different power-management APIs. Consider for example DPMI and IDE
spindown.

> - there's no direct connection between power save and open()

Why shouldn't a device always be put into a power-saving mode whenever it
isn't open? Agreed, you might want to reduce its power usage at times
even when it is open...

> The question when a device is in use is far from trivial.

Yes. It has to be decided by each individual driver. For simple
character-oriented devices, "open" is a good first start.

Alan Stern