summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorsgadagottu <sgadagottu@nvidia.com>2010-03-03 19:35:14 +0530
committerGary King <gking@nvidia.com>2010-03-03 19:56:49 -0800
commit17f12ae875e3afedaaaca474b46d3ccd5150bea0 (patch)
treeccdac45f6da36bbe0b0460d512b219c8141fbf2e /drivers/usb/gadget
parent7a44e354c4cf1f369978efe679e7be888a7b47a4 (diff)
tegra usb: Making USB busy hints off on resume, when there is no adb
cable/usb device connection Currently on resume from LP1, though there is no adb cable/USB device connected to USB1/USB3 then also usb busy hints are getting on. With this change on resume: For gadget driver, if cable is not connected then busy hints made off. For host driver, if device(s) are not connected then busy hints are off. Code Clean-up for power improvement Tested on : Whistler board USB1 OTG + USB3 host Tested with all possible connection on USB1 and USB3 Change-Id: I6d210bba1264d9c0134d586d3f67ff609ba2b3fe Reviewed-on: http://git-master/r/745 Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Tested-by: Narendra Damahe <ndamahe@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'drivers/usb/gadget')
-rwxr-xr-xdrivers/usb/gadget/fsl_udc_core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index 33502502c67e..f30912b62fca 100755
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2764,6 +2764,11 @@ static int fsl_udc_resume(struct platform_device *pdev)
udc_controller->usb_state = USB_STATE_ATTACHED;
udc_controller->ep0_state = WAIT_FOR_SETUP;
udc_controller->ep0_dir = 0;
+
+ /* Power down the phy if cable is not connected */
+ if (!(fsl_readl(&usb_sys_regs->vbus_wakeup) & USB_SYS_VBUS_STATUS))
+ platform_udc_clk_suspend();
+
return 0;
}