Skip to contentSkip to conversation

usb: xhci: plat: Enable runtime PM

PATCH RESEND Superseded Robert Foss 2 participants 3 messages Feb 10, 2017 – Feb 20, 2017

Subsystems (2)

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v7 cover usb: xhci: plat: Enable runtime PM

This series enables runtime PM and asynchronous resume/suspend support for xhci-plat devices.

Changes since v1:
- Added Signed-off-by: Robert Foss <[email protected]>
- Added proper metadata tags to series

Changes since v2:
- Added missing changelog to cover-letter
- Added error checking to pm_runtime_get_sync() calls

Changes since v3:
- Decrement usage_counter for failed pm_runtime_get*() calls

Changes since v4:
- Added missing brackets

Changes since v5:
- Switched out atomic_dec() calls with pm_runtime_put() calls

Changes since v6:
- Rebased on v4.10-rc3
- Dropped "usb: xhci: plat: Enable async suspend/resume" since it is superseded by
https://lkml.org/lkml/2016/12/13/32

Andrew Bresticker (1):
usb: xhci: plat: Enable async suspend/resume

 drivers/usb/host/xhci-plat.c | 1 +
 1 file changed, 1 insertion(+)
Signature · 1 line
2.11.0.453.g787f75f05
#1 lore raw

PATCH RESEND v7 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.

---
 drivers/usb/host/xhci-plat.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-plat.c +1 -0
index 3cf8e120c620..4d6741a0d8f8 100644
@@ -257,6 +257,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
 
 	pm_runtime_set_active(&pdev->dev);
 	pm_runtime_enable(&pdev->dev);
+	device_enable_async_suspend(&pdev->dev);
 
 	return 0;
 
Signature · 1 line
2.11.0.453.g787f75f05
Reviewed-by on v7 1/1
#2 lore raw

Re: [PATCH RESEND v7 1/1] usb: xhci: plat: Enable async suspend/resume

Quoted 29 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.

---
 drivers/usb/host/xhci-plat.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-plat.c +1 -1
index 3cf8e120c620..4d6741a0d8f8 100644
@@ -257,6 +257,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
 
        pm_runtime_set_active(&pdev->dev);
        pm_runtime_enable(&pdev->dev);
+       device_enable_async_suspend(&pdev->dev);
 
        return 0;
 
--
Quoted 2 lines

2.11.0.453.g787f75f05

Signature · 2 lines
Baolin.wang
Best Regards