Loading drivers/usb/host/xhci-hub.c +1 −1 Original line number Diff line number Diff line Loading @@ -1550,7 +1550,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, xhci_set_link_state(xhci, ports[wIndex], XDEV_RESUME); spin_unlock_irqrestore(&xhci->lock, flags); msleep(USB_RESUME_TIMEOUT); usleep_range(21000, 21500); spin_lock_irqsave(&xhci->lock, flags); xhci_set_link_state(xhci, ports[wIndex], XDEV_U0); Loading drivers/usb/host/xhci-plat.c +21 −19 Original line number Diff line number Diff line Loading @@ -216,16 +216,10 @@ static int xhci_plat_probe(struct platform_device *pdev) return ret; } pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); pm_runtime_get_noresume(&pdev->dev); hcd = __usb_create_hcd(driver, sysdev, &pdev->dev, dev_name(&pdev->dev), NULL); if (!hcd) { ret = -ENOMEM; goto disable_runtime; } if (!hcd) return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hcd->regs = devm_ioremap_resource(&pdev->dev, res); Loading Loading @@ -263,6 +257,15 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto disable_reg_clk; 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); priv_match = of_device_get_match_data(&pdev->dev); if (priv_match) { struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); Loading Loading @@ -327,13 +330,9 @@ static int xhci_plat_probe(struct platform_device *pdev) goto dealloc_usb2_hcd; device_enable_async_suspend(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); /* * Prevent runtime pm from being on as default, users should enable * runtime pm using power/control in sysfs. */ pm_runtime_forbid(&pdev->dev); pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_put_autosuspend(&pdev->dev); return 0; Loading @@ -348,6 +347,8 @@ static int xhci_plat_probe(struct platform_device *pdev) usb_put_hcd(xhci->shared_hcd); disable_clk: pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); clk_disable_unprepare(xhci->clk); disable_reg_clk: Loading @@ -356,10 +357,6 @@ static int xhci_plat_probe(struct platform_device *pdev) put_hcd: usb_put_hcd(hcd); disable_runtime: pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); return ret; } Loading Loading @@ -412,6 +409,11 @@ static int __maybe_unused xhci_plat_runtime_suspend(struct device *dev) struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); if (!xhci) return 0; dev_dbg(dev, "xhci-plat runtime suspend\n"); return xhci_suspend(xhci, true); } Loading Loading @@ -441,7 +443,7 @@ static const struct dev_pm_ops xhci_plat_pm_ops = { SET_RUNTIME_PM_OPS(xhci_plat_runtime_suspend, xhci_plat_runtime_resume, NULL) xhci_plat_runtime_idle) }; #ifdef CONFIG_ACPI Loading Loading
drivers/usb/host/xhci-hub.c +1 −1 Original line number Diff line number Diff line Loading @@ -1550,7 +1550,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, xhci_set_link_state(xhci, ports[wIndex], XDEV_RESUME); spin_unlock_irqrestore(&xhci->lock, flags); msleep(USB_RESUME_TIMEOUT); usleep_range(21000, 21500); spin_lock_irqsave(&xhci->lock, flags); xhci_set_link_state(xhci, ports[wIndex], XDEV_U0); Loading
drivers/usb/host/xhci-plat.c +21 −19 Original line number Diff line number Diff line Loading @@ -216,16 +216,10 @@ static int xhci_plat_probe(struct platform_device *pdev) return ret; } pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); pm_runtime_get_noresume(&pdev->dev); hcd = __usb_create_hcd(driver, sysdev, &pdev->dev, dev_name(&pdev->dev), NULL); if (!hcd) { ret = -ENOMEM; goto disable_runtime; } if (!hcd) return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hcd->regs = devm_ioremap_resource(&pdev->dev, res); Loading Loading @@ -263,6 +257,15 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto disable_reg_clk; 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); priv_match = of_device_get_match_data(&pdev->dev); if (priv_match) { struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); Loading Loading @@ -327,13 +330,9 @@ static int xhci_plat_probe(struct platform_device *pdev) goto dealloc_usb2_hcd; device_enable_async_suspend(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); /* * Prevent runtime pm from being on as default, users should enable * runtime pm using power/control in sysfs. */ pm_runtime_forbid(&pdev->dev); pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_put_autosuspend(&pdev->dev); return 0; Loading @@ -348,6 +347,8 @@ static int xhci_plat_probe(struct platform_device *pdev) usb_put_hcd(xhci->shared_hcd); disable_clk: pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); clk_disable_unprepare(xhci->clk); disable_reg_clk: Loading @@ -356,10 +357,6 @@ static int xhci_plat_probe(struct platform_device *pdev) put_hcd: usb_put_hcd(hcd); disable_runtime: pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); return ret; } Loading Loading @@ -412,6 +409,11 @@ static int __maybe_unused xhci_plat_runtime_suspend(struct device *dev) struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); if (!xhci) return 0; dev_dbg(dev, "xhci-plat runtime suspend\n"); return xhci_suspend(xhci, true); } Loading Loading @@ -441,7 +443,7 @@ static const struct dev_pm_ops xhci_plat_pm_ops = { SET_RUNTIME_PM_OPS(xhci_plat_runtime_suspend, xhci_plat_runtime_resume, NULL) xhci_plat_runtime_idle) }; #ifdef CONFIG_ACPI Loading