aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2012-03-01 13:17:07 -0800
committerArve Hjønnevåg <arve@android.com>2013-04-29 14:52:30 -0700
commit54bfea14138aeb93cf332698a2881dfd1e668ccd (patch)
tree4105c5ca445fe61802e1f8b2bd4808b149a112af
parentc275f8de7b53514537c199847c5d7b1f9834de72 (diff)
downloadvexpress-lsk-54bfea14138aeb93cf332698a2881dfd1e668ccd.tar.gz
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 f8f62c3ed65..9a40c73ee0b 100644
--- a/drivers/usb/gadget/udc-core.c
+++ b/drivers/usb/gadget/udc-core.c
@@ -277,7 +277,15 @@ static int udc_bind_to_driver(struct usb_udc *udc, struct usb_gadget_driver *dri
driver->unbind(udc->gadget);
goto err1;
}
- usb_gadget_connect(udc->gadget);
+ /*
+ * HACK: 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. Remove
+ * the call to usb_gadget_connect bellow to avoid enabling the
+ * pullup before userspace is ready.
+ *
+ * usb_gadget_connect(udc->gadget);
+ */
kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE);
return 0;