Skip to content

Commit

Permalink
USB: chipidea: delay 2ms before read ID status at probe time
Browse files Browse the repository at this point in the history
The ID pin needs 1ms debounce time, even at probe time. We delay 2ms
to be on the safe side.

Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Richard Zhao authored and Greg Kroah-Hartman committed Sep 12, 2012
1 parent b4dbb25 commit 86ad01a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/chipidea/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 86ad01a

Please sign in to comment.