diff options
author | Bitan Biswas <bbiswas@nvidia.com> | 2011-03-04 21:33:13 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:43:30 -0800 |
commit | 459e7962e32b7f9293c4c6b8aaf6a424e574e12d (patch) | |
tree | 33de22e228883125d70879c34a600fe89be1aba8 /drivers/usb/gadget | |
parent | e26d3ee6a7c33df7313bee68776ba87c8512f735 (diff) |
tegra:otg: Fix clock disable to match ref count
usbd clock is enabled during the probe and not disabled after the
functionality. Due to this clock reference count is non-zero and hence
usbd clock is not disabled during suspend. Fixed this by disabling
clock appropriately.
- Since clocks are now turned off during suspend clock
needs to be enabled during fsl_udc_resume.
Bug 793834
Original-Change-Id: I4d153b98b7388547c13fa5e3d550f687183bfbe8
Reviewed-on: http://git-master/r/21652
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Narendra Damahe <ndamahe@nvidia.com>
Tested-by: Narendra Damahe <ndamahe@nvidia.com>
Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com>
Original-Change-Id: I90231ac796b2fd778f7c5b9caf43a9756eddae77
Rebase-Id: Rcb29120d40c0e60bc634812d7919592b0fee400a
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/fsl_udc_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 543c4fc7f5d1..70505f5e672b 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c @@ -3133,12 +3133,13 @@ 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) { + /* enable clock */ + fsl_udc_clk_resume(); if (!(fsl_readl(&usb_sys_regs->vbus_wakeup) & USB_SYS_ID_PIN_STATUS)) { /* If ID status is low means host is connected, return */ return 0; } - /* enable clock and check for VBUS */ - fsl_udc_clk_resume(); + /* 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_suspend(); |