usb: dwc2: add shutdown callback to platform variant
authorHeiko Stübner <heiko.stuebner@collabora.com>
Fri, 18 Dec 2015 18:30:59 +0000 (19:30 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 22 Dec 2015 18:12:51 +0000 (12:12 -0600)
commita40a00318c7fcdd23e73cfffac0e33430a43a3e3
tree4d371b3295e3cc4e1a53bf670c86f4c864d6f26d
parentea4a8cb1c2b47570e77f4489659e2c653ca66f9e
usb: dwc2: add shutdown callback to platform variant

In specific conditions (involving usb hubs) dwc2 devices can create a
lot of interrupts, even to the point of overwhelming devices running
at low frequencies. Some devices need to do special clock handling
at shutdown-time which may bring the system clock below the threshold
of being able to handle the dwc2 interrupts. Disabling dwc2-irqs
in a shutdown callbacks prevents reboots/poweroffs from getting stuck
in such cases.

The hsotg struct already contains an unused irq element, so we can
just use it to store the irq number for the shutdown callback.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Heiko Stuebner <heiko.stuebner@collabora.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/platform.c