if (musb->xceiv)
otg_set_peripheral(musb->xceiv->otg, &musb->g);
+ else
+ phy_set_mode(musb->phy, PHY_MODE_USB_DEVICE);
musb_set_state(musb, OTG_STATE_B_IDLE);
spin_unlock_irqrestore(&musb->lock, flags);
if (musb->xceiv)
otg_set_peripheral(musb->xceiv->otg, NULL);
+ else
+ phy_set_mode(musb->phy, PHY_MODE_INVALID);
musb->is_active = 0;
musb->gadget_driver = NULL;
if (musb->xceiv) {
otg_set_host(musb->xceiv->otg, &hcd->self);
musb->xceiv->otg->host = &hcd->self;
+ } else {
+ phy_set_mode(musb->phy, PHY_MODE_USB_HOST);
}
/* don't support otg protocols */