usb: dwc2: Postponed gadget registration to the udc class driver
authorMinas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Tue, 9 Jun 2020 08:28:11 +0000 (12:28 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Jun 2020 08:42:52 +0000 (10:42 +0200)
commit207324a321a866401b098cadf19e4a2dd6584622
tree3f39c3b1aabe2915888c010051d6f352ae3c7bfa
parent5d8021923e8a8cc37a421a64e27c7221f0fee33c
usb: dwc2: Postponed gadget registration to the udc class driver

During dwc2 driver probe, after gadget registration to the udc class
driver, if exist any builtin function driver it immediately bound to
dwc2 and after init host side (dwc2_hcd_init()) stucked in host mode.
Patch postpone gadget registration after host side initialization done.

Fixes: 117777b2c3bb9 ("usb: dwc2: Move gadget probe function into platform code")
Reported-by: kbuild test robot <lkp@intel.com>
Tested-by: Marek Vasut <marex@denx.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Link: https://lore.kernel.org/r/f21cb38fecc72a230b86155d94c7e60c9cb66f58.1591690938.git.hminas@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/gadget.c
drivers/usb/dwc2/platform.c