Skip to content

Commit

Permalink
usb: musb: disable otg protocol support
Browse files Browse the repository at this point in the history
As decided in the discussion [1] we are deleting the otg protocol
support from the musb drivers.

First this patch disables the flags for enabling the otg protocols. We
will later gradually delete the otg protocol code from the musb drivers.

[1] https://www.spinics.net/lists/linux-usb/msg167003.html

Signed-off-by: Bin Liu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
liubiin authored and gregkh committed May 22, 2018
1 parent d2852f2 commit 0a9134b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1798,11 +1798,8 @@ int musb_gadget_setup(struct musb *musb)

/* this "gadget" abstracts/virtualizes the controller */
musb->g.name = musb_driver_name;
#if IS_ENABLED(CONFIG_USB_MUSB_DUAL_ROLE)
musb->g.is_otg = 1;
#elif IS_ENABLED(CONFIG_USB_MUSB_GADGET)
/* don't support otg protocols */
musb->g.is_otg = 0;
#endif
INIT_DELAYED_WORK(&musb->gadget_work, musb_gadget_work);
musb_g_init_endpoints(musb);

Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/musb/musb_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -2755,7 +2755,8 @@ int musb_host_setup(struct musb *musb, int power_budget)
musb->xceiv->otg->state = OTG_STATE_A_IDLE;
}
otg_set_host(musb->xceiv->otg, &hcd->self);
hcd->self.otg_port = 1;
/* don't support otg protocols */
hcd->self.otg_port = 0;
musb->xceiv->otg->host = &hcd->self;
hcd->power_budget = 2 * (power_budget ? : 250);
hcd->skip_phy_initialization = 1;
Expand Down

0 comments on commit 0a9134b

Please sign in to comment.