From f3d95dd1f713e29b86c7f7ab908396ea3eacea1f Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Fri, 1 Mar 2013 16:37:42 +0800 Subject: [PATCH] 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 --- drivers/usb/otg/fsl_otg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 { -- 2.39.5