From: Peter Chen Date: Fri, 1 Mar 2013 08:37:42 +0000 (+0800) Subject: ENGR00251209-2 usb: otg: fix the dp/dm will be floating when phy is no 3v3 X-Git-Tag: v3.0.35-fsl~103 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f3d95dd1f713e29b86c7f7ab908396ea3eacea1f;p=karo-tx-linux.git ENGR00251209-2 usb: otg: fix the dp/dm will be floating when phy is no 3v3 For the design which the phy is no power (no 5v for VBUS), the PHY can't get dp/dm correctly, so it the port change interrpt is enabled or the host enters low power mode, the unexpected interrupt will occur. This commit will make the dp/dm as zero at otg configuration. For gadget-only, the same function is existed at probe. For host-only, the vbus will be on before port change interrupt is enabled. Signed-off-by: Peter Chen --- diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c index 292c2e930b5d..9fd3c87babfb 100755 --- a/drivers/usb/otg/fsl_otg.c +++ b/drivers/usb/otg/fsl_otg.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2012 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. * * Author: Li Yang * Jerry Huang @@ -631,6 +631,11 @@ static int fsl_otg_set_host(struct otg_transceiver *otg_p, struct usb_bus *host) if (otg_dev->fsm.id) { otg_dev->host_first_call = true; + /* The discharge will be false when the controller + * is ready to use. + */ + if (pdata->dr_discharge_line) + pdata->dr_discharge_line(true); schedule_otg_work(&otg_dev->otg_event, 100); } else {