Replace hardcoded gadget capability from interface setup to gadget setup. Signed-off-by: Macpaul Lin <macpaul@xxxxxxxxx> --- changes for v1: - no change changes for v2: - no change changes for v3: - new commit for adapting to musb drivers changes for v4: - fix description of each git commits. drivers/usb/musb/musb_gadget.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 4c481cd..3445ecc 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1795,6 +1795,11 @@ int musb_gadget_setup(struct musb *musb) musb->g.name = musb_driver_name; #if IS_ENABLED(CONFIG_USB_MUSB_DUAL_ROLE) musb->g.is_otg = 1; + musb->g.hnp_support = 1; + musb->g.srp_support = 1; +#if IS_ENABLED(CONFIG_USB_OTG20) + musb->g.is_otg20 = 1; +#endif #elif IS_ENABLED(CONFIG_USB_MUSB_GADGET) musb->g.is_otg = 0; #endif -- 1.8.3.2 -- 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