Re: Controller's wakeup setting at usb_add_hcd

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

 



On Wed, Oct 23, 2013 at 10:55:08AM -0400, Alan Stern wrote:
> On Tue, 22 Oct 2013, Peter Chen wrote:
> 
> > Hi Alan,
> > 
> > Currently, the controller's wakeup setting is enabled by default,
> > is it ok let it be disabled by default, and let the user control it.
> > Enable usb wakeup will cause more power consumption(some phy logic
> > need to be on to detect wakeup) and unexpected usb wakeup may be
> > considered as an unexpected behaviour.
> 
> Isn't this the sort of thing that should be handled in userspace?  If
> the user (or the distro) sets the appropriate wakeup value for the
> controller then the default doesn't matter.
> 
> It's not possible for the kernel to guess what the user wants.  For 
> example, if there's a USB keyboard then probably wakeup should be 
> enabled.  But what if there's a mouse and no keyboard?  The kernel 
> can't tell.  In the end, we have to let the user tell us.
> 
> > Meanwhile, the controller may not be dedicated for host, it may otg
> > controller, the hcd is deleted when switches to device mode,
> > the wakeup setting for controller is still enabled, it is not suitable.
> 
> If the HC is deleted and the UDC is added then the wakeup settings
> should be determined by the UDC, not by the HC.  The next time the
> system goes to sleep, the UDC driver should be responsible for enabling
> or disabling wakeup.
> 

I agree both of your points, but after thinking more, I doubt
that why hcd (or udc) needs to control its parent wakeup setting?
Why not let controller driver decide it?

-- 

Best Regards,
Peter Chen

--
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