On Thu, Sep 02, 2010 at 03:09:17PM +0200, Matthieu CASTET wrote: > Hello, > > even if the usb gadget framework is limited to work with one driver, > it could be useful to have a kernel build with more than driver. > This allow to make generic kernel that work with similar platform > (but different udc controller). > > After looking at the current code, the only blocker to do that is > usb_gadget_register_driver/usb_gadget_unregister_driver function > that are declared in each driver. > > For avoiding that I propose to do a redirection for these functions. > At probe time the driver register them (usb_gadget_register_udc), > and usb_gadget_register_driver/usb_gadget_unregister_driver call > these callback. > > Only one probing should succeed, so only one call to > usb_gadget_register_udc is done. It not, only the first one will > succeed. > > I attach a draft of that. > > What do you think of it ? I like the idea, thanks. Don't know too much about the implementation, I'll let David be the judge of that. thanks, greg k-h -- 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