aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Goby2012-03-01 15:17:07 -0600
committerArve Hjønnevåg2013-02-22 17:27:52 -0600
commit9b95e130377747fb2d2edd71e9f641696b73e23a (patch)
treee48ce2e7ff3b8d38275cab73cd7f4ffe771047fe
parent8598af4630b00557b545e79097728ddee314dfd0 (diff)
downloadkernel-common-9b95e130377747fb2d2edd71e9f641696b73e23a.tar.gz
kernel-common-9b95e130377747fb2d2edd71e9f641696b73e23a.tar.xz
kernel-common-9b95e130377747fb2d2edd71e9f641696b73e23a.zip
HACK: usb: gadget: Fix enumeration on boot
The Android gadget driver disconnects the gadget on bind and expects the gadget to stay disconnected until it calls usb_gadget_connect when userspace is ready. Removed the call to usb_gadget_connect in usb_gadget_probe_driver to avoid enabling the pullup before userspace is ready. Change-Id: I63707ac6e16a44eca52351a4bf80407d25fbd35e Signed-off-by: Benoit Goby <benoit@android.com>
-rw-r--r--drivers/usb/gadget/udc-core.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c
index 4d90a800063..231580f5c9c 100644
--- a/drivers/usb/gadget/udc-core.c
+++ b/drivers/usb/gadget/udc-core.c
@@ -346,7 +346,15 @@ found:
346 driver->unbind(udc->gadget); 346 driver->unbind(udc->gadget);
347 goto err1; 347 goto err1;
348 } 348 }
349 usb_gadget_connect(udc->gadget); 349 /*
350 * HACK: The Android gadget driver disconnects the gadget
351 * on bind and expects the gadget to stay disconnected until
352 * it calls usb_gadget_connect when userspace is ready. Remove
353 * the call to usb_gadget_connect bellow to avoid enabling the
354 * pullup before userspace is ready.
355 *
356 * usb_gadget_connect(udc->gadget);
357 */
350 } else { 358 } else {
351 359
352 ret = usb_gadget_start(udc->gadget, driver, driver->bind); 360 ret = usb_gadget_start(udc->gadget, driver, driver->bind);