Skip to contentSkip to conversation

usb: xhci: plat: Enable async suspend/resume

PATCH RESEND In review Robert Foss 2 participants 2 messages Feb 20, 2017 – Feb 21, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND v8 1/1 usb: xhci: plat: Enable async suspend/resume

From: Andrew Bresticker <[email protected]>

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.

---

Changes since v8:
- Rebased on upstream/master
- Added r-b of Baolin Wang

 drivers/usb/host/xhci-plat.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-plat.c +2 -0
index e5834dd9bcde..8ef34fe4d5c0 100644
@@ -255,6 +255,8 @@ static int xhci_plat_probe(struct platform_device *pdev)
 	if (ret)
 		goto dealloc_usb2_hcd;
 
+	device_enable_async_suspend(&pdev->dev);
+
 	return 0;
 
 
Signature · 1 line
2.11.0.453.g787f75f05
#1 lore raw
Quoted 28 lines · Robert Foss

From: Andrew Bresticker <[email protected]>

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.

---

Changes since v8:
- Rebased on upstream/master
- Added r-b of Baolin Wang

  drivers/usb/host/xhci-plat.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/usb/host/xhci-plat.c +0 -0
index e5834dd9bcde..8ef34fe4d5c0 100644

drivers/usb/host/xhci-plat.c static int xhci_plat_probe(struct platform_device *pdev) · line 261

Quoted 7 lines
drivers/usb/host/xhci-plat.c +2 -0
@@ -255,6 +255,8 @@ static int xhci_plat_probe(struct platform_device *pdev)
  	if (ret)
  		goto dealloc_usb2_hcd;
 
+	device_enable_async_suspend(&pdev->dev);
+
  	return 0;
 

Thanks, added to queue

-Mathias