Re: [RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

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

 



On Wed, 13 Aug 2014, Felipe Balbi wrote:

> Keeping track of the pullup's state like that will just add complexity
> to the UDC drivers. There's really no problem in connecting pullups
> before VBUS is above session valid threshold.

Except that doing so violates the hardware test suite Peter mentioned.  
That was the starting point of this discussion.

> The whole idea of udc-core was to handle those details generically so we
> don't have to patch every single UDC driver. The best solution, IMO,
> would be to teach every function about activate/deactivate and only
> connect pullups based on that. So that functions, and only functions,
> are responsible for managing pullups.
> 
> Functions which don't need to wait for userspace can just call
> usb_function_activate() from their bind() method, while functions
> relying on userspace can do so when the devnode is opened or whatever.

usb_function_activate() is part of libcomposite.  Do we still have any
of the old-style gadgets that don't use libcomposite?  Aside from 
inode.c, it doesn't look like there are any...

If you want libcomposite to handle the pullups on behalf of the 
function drivers, there has to be a way for the UDC driver to tell 
libcomposite when Vbus turns on and off.  Add a new callback to the 
usb_gadget_driver structure?

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