Re: [RFC PATCH] USB: enable "power/wakeup" to control remote wakeup in the runtime suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 17 Jul 2012, Oliver Neukum wrote:

> > Yeah. Lost some background introduction. I recently try to realize usb 
> > port power off mechanism for ports with device. So design, the port with
> > device only can be power off when remote wakeup disable.

Why is that?  What happens if you power-off a port where the device has 
remove wakeup enabled?

> >  But I found 
> > remote wakeup was entirely control by driver and userspace has no 
> > control. needs_remote_wakeup is set to 1 when the device is opened.

What sort of driver are you talking about?  An HID driver?  Serial
driver?

> But the driver will not work if you don't use remote wakeup when it needs it.
> Under those circumstances you better unbind the driver.
> 
> > So that means the device's remote wakeup can not be disabled and usb 
> > port can not be powered off. So I try to provide a control of remote 
> > wakeup to userspace. When system becomes idle such as blank screen,
> > some usb devices may be able to disable remote wakeup and power off.
> 
> Yes, this is an unsoved problem. But the approach is no good. Don't
> disable remote wakeup behind the driver's back. Tell the driver that a reduced
> level of service is acceptable.

The best way to do this might depend on the driver.

But in general, if a driver needs wakeup in order to work properly then 
it _won't_ work when the port is powered off.  So as Oliver says, the 
user might as well unbind the driver first.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux