]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00251209-2 usb: otg: fix the dp/dm will be floating when phy is no 3v3
authorPeter Chen <peter.chen@freescale.com>
Fri, 1 Mar 2013 08:37:42 +0000 (16:37 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:55 +0000 (08:35 +0200)
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 <peter.chen@freescale.com>
drivers/usb/otg/fsl_otg.c

index 292c2e930b5d9ad3f0047792f6e34ba248c97e6d..9fd3c87babfb9220bd939d2a485cb9f48c917ed1 100755 (executable)
@@ -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 <LeoLi@freescale.com>
  *         Jerry Huang <Chang-Ming.Huang@freescale.com>
@@ -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 {