summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2/gadget.c
diff options
context:
space:
mode:
authorGregory Herrero <gregory.herrero@intel.com>2015-01-30 11:09:37 +0300
committerFelipe Balbi <balbi@ti.com>2015-01-30 19:34:19 +0300
commitb4c2378df6419b81eefcb9cd56726321c29a70ca (patch)
tree9398de330f62f33a6f1ca7a162e62e4d7e3b12a6 /drivers/usb/dwc2/gadget.c
parentf889f23d1c15fa73edaecc2cbce35a441eb52581 (diff)
downloadlinux-b4c2378df6419b81eefcb9cd56726321c29a70ca.tar.xz
usb: dwc2: gadget: initialize controller in pullup callback
USB reset interrupt is no more used to reset the controller. Thus, reset the controller in pullup callback as described by Synopsys programming guide. Otherwise enumeration sometimes fails when usb configuration is switched without physical disconnection. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-rw-r--r--drivers/usb/dwc2/gadget.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index f201f6d17bc7..15aa5785090b 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3162,6 +3162,7 @@ static int s3c_hsotg_pullup(struct usb_gadget *gadget, int is_on)
if (is_on) {
clk_enable(hsotg->clk);
hsotg->enabled = 1;
+ s3c_hsotg_core_init_disconnected(hsotg, false);
s3c_hsotg_core_connect(hsotg);
} else {
s3c_hsotg_core_disconnect(hsotg);