If musb_gadget_vbus_draw() also toggles a clock like tusb does,
USB clock will stay on after rmmoding a gadget driver. This
can block omap idle states.
Also handle disconnect as b_idle so that musb_gadget_vbus_draw()
gets called.
Signed-off-by: Tony Lindgren <tony@atomide.com>
#endif
if (musb->gadget_driver == driver) {
+
+ (void) musb_gadget_vbus_draw(&musb->g, 0);
+
musb->xceiv.state = OTG_STATE_UNDEFINED;
stop_activity(musb, driver);
#endif /* OTG */
#ifdef CONFIG_USB_GADGET_MUSB_HDRC
case OTG_STATE_B_PERIPHERAL:
+ case OTG_STATE_B_IDLE:
musb_g_disconnect(musb);
break;
#endif /* GADGET */