Commit 01b8daf7 authored by Vivek Gautam's avatar Vivek Gautam Committed by Felipe Balbi

usb: dwc3: shutdown usb_phy when removing the device

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: default avatarVivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 6ff1f3d3
...@@ -409,6 +409,10 @@ static void dwc3_core_exit(struct dwc3 *dwc) ...@@ -409,6 +409,10 @@ static void dwc3_core_exit(struct dwc3 *dwc)
{ {
dwc3_event_buffers_cleanup(dwc); dwc3_event_buffers_cleanup(dwc);
dwc3_free_event_buffers(dwc); dwc3_free_event_buffers(dwc);
usb_phy_shutdown(dwc->usb2_phy);
usb_phy_shutdown(dwc->usb3_phy);
} }
#define DWC3_ALIGN_MASK (16 - 1) #define DWC3_ALIGN_MASK (16 - 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment