On Tue, Sep 17, 2013 at 12:39:51PM -0500, Felipe Balbi wrote: > Hi, > > On Tue, Sep 17, 2013 at 07:08:12PM +0200, Michael Grzeschik wrote: > > On Wed, Sep 11, 2013 at 09:01:39AM +0200, Michael Grzeschik wrote: > > > On Tue, Sep 10, 2013 at 04:19:40PM +0200, Michael Grzeschik wrote: > > > > usb_function_{de}activate makes it possible to have several "gadget > > > > functions", inside one composite device, to be able to prevent the gadget > > > > to enumerate until an prepared condition has triggered (i.e. userspace > > > > daemon has started) > > > > > > > > This patch simplifies and renames the functions to its actual meaning > > > > usb_cdev_{de}activate and fixes all its users. As the code is counting > > > > the deactivations in the current cdev. > > > > > > I was working on this also to be used in udc-core for udc_bind_to_driver. > > > Because the current implementation will call usb_gadget_connect without > > > checking for delaying functions. But for that the whole mechanism needs > > > to be ported to gadget level. > > > > > > What do you think about usb_gadget_deactivate/usb_gadget_activate ? > > > > Just a short ping on that mails. You probably mist them, as > > I replied to myself in the first place! ;-) > > We could certainly add usb_gadget_activate/deactivate functions, but I'm > not sure what's best to implement: > > a) entirely new functions > b) add refcounting to usb_gadget_connect/disconnect > > Also, we can't simply force all functions to be deactivated and forget > about everything else. Not all functions are using > usb_function_activate/deactivate as of today. We could, rather easily, > just add those calls to such functions and force the conversion. > > what do you think ? I think we will only need usb_gadget_activate/deactivate in the end. Forcing the conversion with all functions implementing activate/deactivate is necessary, to let the framework behave reliable. This way there will be no need for the seperate set of usb_function_activate/dectivate anyway. Regards, Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- 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