Hello. On 16-03-2011 14:50, Pavan Kondeti wrote:
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 different udc controller.
The only blocker to do that is usb_gadget_register_driver and usb_gadget_unregister_driver function are declared in each driver.
For avoiding that a redirection is done for these functions : At probe time the driver register them (usb_gadget_register and usb_gadget_unregister), and the generic usb_gadget_register_driver and usb_gadget_unregister_driver call these callback. We pass struct *usb_gadget in usb_gadget_register and usb_gadget_unregister for flexibility (we can latter do a more complex dispatcher).
Signed-off-by: Matthieu CASTET<matthieu.castet@xxxxxxxxxx> Ack-by: Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> ---
<snip>
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index d500996..d088bb0 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -559,6 +559,12 @@ config USB_CI13XXX_MSM default USB_GADGET select USB_GADGET_SELECTED +config USB_GADGET_MULTIUDC + boolean "multi USB Device Port" + select USB_GADGET_SELECTED + help + Allow to build more than one udc. +
default n ?
It's already implicitly "default n". WBR, Sergei -- 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