usb: xhci: plat: Enable async suspend/resume
authorAndrew Bresticker <abrestic@chromium.org>
Fri, 7 Apr 2017 14:56:49 +0000 (17:56 +0300)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:39:15 +0000 (15:39 -0500)
USB host controllers can take a significant amount of time to suspend
and resume, adding several hundred miliseconds to the kernel resume
time. Since the XHCI controller has no outside dependencies (other than
clocks, which are suspended late/resumed early), allow it to suspend and
resume asynchronously.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c70a1529b29cb1362ade5dd113313fb945e32c3e)

drivers/usb/host/xhci-plat.c

index 984d8c6..8e087fa 100644 (file)
@@ -268,6 +268,8 @@ static int xhci_plat_probe(struct platform_device *pdev)
        if (ret)
                goto dealloc_usb2_hcd;
 
+       device_enable_async_suspend(&pdev->dev);
+
        return 0;