summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorSuresh Mangipudi <smangipudi@nvidia.com>2011-12-30 13:59:33 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-01-06 17:09:30 +0530
commitadd78d0716b92d0e5aa3169bcddff8b523e272e6 (patch)
tree10ea2a1fa4dd87854ad873b272835083c4dfacb8 /drivers/usb/gadget
parentcda141fa6a9eff743ce8504a510cde9ab89d7a45 (diff)
usb: gadget: fsl_udc: fix resume path for power
USB Device when resuming from LP0 will reset the PowerDown values of USB, these powerdown have to be reprogrammed when there is no usb cable when device resumes from LP0. Bug 919432 Change-Id: I306efc3614cceffbf132db92e0a897693043e3f7 Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-on: http://git-master/r/72722 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/fsl_udc_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index 813d290cdc5c..eeec98f36901 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -3172,19 +3172,19 @@ static int fsl_udc_suspend(struct platform_device *pdev, pm_message_t state)
static int fsl_udc_resume(struct platform_device *pdev)
{
if (udc_controller->transceiver) {
- fsl_udc_clk_enable();
+ fsl_udc_clk_resume(true);
if (!(fsl_readl(&usb_sys_regs->vbus_wakeup) & USB_SYS_ID_PIN_STATUS)) {
/* If ID status is low means host is connected, return */
- fsl_udc_clk_disable();
+ fsl_udc_clk_suspend(false);
return 0;
}
/* check for VBUS */
if (!(fsl_readl(&usb_sys_regs->vbus_wakeup) & USB_SYS_VBUS_STATUS)) {
/* if there is no VBUS then power down the clocks and return */
- fsl_udc_clk_disable();
+ fsl_udc_clk_suspend(false);
return 0;
} else {
- fsl_udc_clk_disable();
+ fsl_udc_clk_suspend(false);
if (udc_controller->transceiver->state == OTG_STATE_A_HOST)
return 0;
/* Detected VBUS set the transceiver state to device mode */