mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
Merge "usb: host: Disable system wakeup if remote wakeup is not required"
This commit is contained in:
commit
f8cfe67a87
3 changed files with 11 additions and 10 deletions
|
|
@ -4470,7 +4470,9 @@ static int dwc3_msm_probe(struct platform_device *pdev)
|
|||
atomic_set(&dwc->in_lpm, 1);
|
||||
pm_runtime_set_autosuspend_delay(mdwc->dev, 1000);
|
||||
pm_runtime_use_autosuspend(mdwc->dev);
|
||||
device_init_wakeup(mdwc->dev, 1);
|
||||
/* Skip creating device wakeup node if remote wakeup is not a requirement*/
|
||||
if (!dwc->ignore_wakeup_src_in_hostmode)
|
||||
device_init_wakeup(mdwc->dev, 1);
|
||||
|
||||
if (of_property_read_bool(node, "qcom,disable-dev-mode-pm"))
|
||||
pm_runtime_get_noresume(mdwc->dev);
|
||||
|
|
@ -5316,7 +5318,7 @@ static int dwc3_msm_pm_suspend(struct device *dev)
|
|||
}
|
||||
|
||||
/* Wakeup not required for automotive/telematics platform host mode */
|
||||
ret = dwc3_msm_suspend(mdwc, false, false);
|
||||
ret = dwc3_msm_suspend(mdwc, false, device_may_wakeup(dev));
|
||||
if (!ret)
|
||||
atomic_set(&mdwc->pm_suspended, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -115,10 +115,6 @@ int dwc3_host_init(struct dwc3 *dwc)
|
|||
if (dwc->revision <= DWC3_REVISION_300A)
|
||||
props[prop_idx++] = PROPERTY_ENTRY_BOOL("quirk-broken-port-ped");
|
||||
|
||||
if (dwc->ignore_wakeup_src_in_hostmode)
|
||||
props[prop_idx++] =
|
||||
PROPERTY_ENTRY_BOOL("ignore-wakeup-src-in-hostmode");
|
||||
|
||||
if (prop_idx) {
|
||||
ret = platform_device_add_properties(xhci, props);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -275,7 +275,8 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|||
*priv = *priv_match;
|
||||
}
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
if (device_may_wakeup(sysdev))
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
xhci->main_hcd = hcd;
|
||||
xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,
|
||||
|
|
@ -330,8 +331,10 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|||
goto dealloc_usb2_hcd;
|
||||
|
||||
device_enable_async_suspend(&pdev->dev);
|
||||
device_wakeup_enable(&xhci->shared_hcd->self.root_hub->dev);
|
||||
device_wakeup_enable(&hcd->self.root_hub->dev);
|
||||
if (device_may_wakeup(sysdev)) {
|
||||
device_wakeup_enable(&xhci->shared_hcd->self.root_hub->dev);
|
||||
device_wakeup_enable(&hcd->self.root_hub->dev);
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
|
@ -402,7 +405,7 @@ static int xhci_plat_suspend(struct device *dev)
|
|||
dev_dbg(dev, "xhci-plat PM suspend\n");
|
||||
|
||||
/* Disable wakeup capability */
|
||||
return xhci_suspend(xhci, false);
|
||||
return xhci_suspend(xhci, device_may_wakeup(dev));
|
||||
}
|
||||
|
||||
static int xhci_plat_resume(struct device *dev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue