Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: musb: disable otg protocol support

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 <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Bin Liu and committed by
Greg Kroah-Hartman
0a9134bd d2852f2d

+3 -5
+1 -4
drivers/usb/musb/musb_gadget.c
··· 1798 1798 1799 1799 /* this "gadget" abstracts/virtualizes the controller */ 1800 1800 musb->g.name = musb_driver_name; 1801 - #if IS_ENABLED(CONFIG_USB_MUSB_DUAL_ROLE) 1802 - musb->g.is_otg = 1; 1803 - #elif IS_ENABLED(CONFIG_USB_MUSB_GADGET) 1801 + /* don't support otg protocols */ 1804 1802 musb->g.is_otg = 0; 1805 - #endif 1806 1803 INIT_DELAYED_WORK(&musb->gadget_work, musb_gadget_work); 1807 1804 musb_g_init_endpoints(musb); 1808 1805
+2 -1
drivers/usb/musb/musb_host.c
··· 2755 2755 musb->xceiv->otg->state = OTG_STATE_A_IDLE; 2756 2756 } 2757 2757 otg_set_host(musb->xceiv->otg, &hcd->self); 2758 - hcd->self.otg_port = 1; 2758 + /* don't support otg protocols */ 2759 + hcd->self.otg_port = 0; 2759 2760 musb->xceiv->otg->host = &hcd->self; 2760 2761 hcd->power_budget = 2 * (power_budget ? : 250); 2761 2762 hcd->skip_phy_initialization = 1;