Loading drivers/usb/host/xhci-plat.c +19 −3 Original line number Diff line number Diff line Loading @@ -135,6 +135,8 @@ static int xhci_plat_probe(struct platform_device *pdev) if (pdev->dev.parent) pm_runtime_resume(pdev->dev.parent); pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, 1000); pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); Loading Loading @@ -174,7 +176,7 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto put_usb3_hcd; pm_runtime_put(&pdev->dev); pm_runtime_put_autosuspend(&pdev->dev); return 0; Loading Loading @@ -240,6 +242,16 @@ static int xhci_plat_resume(struct device *dev) } #ifdef CONFIG_PM_RUNTIME static int xhci_plat_runtime_idle(struct device *dev) { if (pm_runtime_autosuspend_expiration(dev)) { pm_runtime_autosuspend(dev); return -EAGAIN; } return 0; } static int xhci_plat_runtime_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); Loading @@ -257,20 +269,24 @@ static int xhci_plat_runtime_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); int ret; if (!xhci) return 0; dev_dbg(dev, "xhci-plat runtime resume\n"); return xhci_resume(xhci, false); ret = xhci_resume(xhci, false); pm_runtime_mark_last_busy(dev); return ret; } #endif static const struct dev_pm_ops xhci_plat_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(xhci_plat_suspend, xhci_plat_resume) SET_RUNTIME_PM_OPS(xhci_plat_runtime_suspend, xhci_plat_runtime_resume, NULL) xhci_plat_runtime_idle) }; #define DEV_PM_OPS (&xhci_plat_pm_ops) #else Loading Loading
drivers/usb/host/xhci-plat.c +19 −3 Original line number Diff line number Diff line Loading @@ -135,6 +135,8 @@ static int xhci_plat_probe(struct platform_device *pdev) if (pdev->dev.parent) pm_runtime_resume(pdev->dev.parent); pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, 1000); pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); Loading Loading @@ -174,7 +176,7 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto put_usb3_hcd; pm_runtime_put(&pdev->dev); pm_runtime_put_autosuspend(&pdev->dev); return 0; Loading Loading @@ -240,6 +242,16 @@ static int xhci_plat_resume(struct device *dev) } #ifdef CONFIG_PM_RUNTIME static int xhci_plat_runtime_idle(struct device *dev) { if (pm_runtime_autosuspend_expiration(dev)) { pm_runtime_autosuspend(dev); return -EAGAIN; } return 0; } static int xhci_plat_runtime_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); Loading @@ -257,20 +269,24 @@ static int xhci_plat_runtime_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); int ret; if (!xhci) return 0; dev_dbg(dev, "xhci-plat runtime resume\n"); return xhci_resume(xhci, false); ret = xhci_resume(xhci, false); pm_runtime_mark_last_busy(dev); return ret; } #endif static const struct dev_pm_ops xhci_plat_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(xhci_plat_suspend, xhci_plat_resume) SET_RUNTIME_PM_OPS(xhci_plat_runtime_suspend, xhci_plat_runtime_resume, NULL) xhci_plat_runtime_idle) }; #define DEV_PM_OPS (&xhci_plat_pm_ops) #else Loading