Skip to content

Commit

Permalink
usb: dwc3: shutdown usb_phy when removing the device
Browse files Browse the repository at this point in the history
We call usb_phy_init() from dwc3_core_init() during
probe, so adding usb_phy_shutdown() to dwc3_core_exit()
while removing the device so we don't keep PHYs
turned on, consuming power, unnecessarily.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Vivek Gautam authored and Felipe Balbi committed Oct 15, 2012
1 parent 6ff1f3d commit 01b8daf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ static void dwc3_core_exit(struct dwc3 *dwc)
{
dwc3_event_buffers_cleanup(dwc);
dwc3_free_event_buffers(dwc);

usb_phy_shutdown(dwc->usb2_phy);
usb_phy_shutdown(dwc->usb3_phy);

}

#define DWC3_ALIGN_MASK (16 - 1)
Expand Down

0 comments on commit 01b8daf

Please sign in to comment.