From: Richard Zhao Date: Wed, 12 Sep 2012 11:58:07 +0000 (+0300) Subject: USB: chipidea: delay 2ms before read ID status at probe time X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=86ad01a907d7856edc07d8b49260c39520c0e932;p=openwrt%2Fstaging%2Fblogic.git USB: chipidea: delay 2ms before read ID status at probe time The ID pin needs 1ms debounce time, even at probe time. We delay 2ms to be on the safe side. Tested-by: Michael Grzeschik Tested-by: Marc Kleine-Budde Signed-off-by: Richard Zhao Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 1083585fad00..3c3ed77a55bb 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -462,6 +462,8 @@ static int __devinit ci_hdrc_probe(struct platform_device *pdev) if (ci->roles[CI_ROLE_HOST] && ci->roles[CI_ROLE_GADGET]) { ci->is_otg = true; + /* ID pin needs 1ms debouce time, we delay 2ms for safe */ + mdelay(2); ci->role = ci_otg_role(ci); } else { ci->role = ci->roles[CI_ROLE_HOST]