mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
usb: hcd: move controller wakeup setting initialization to individual driver
Individual controller driver has different requirement for wakeup setting, so move it from core to itself. In order to align with current etting the default wakeup setting is enabled (except for chipidea host). Pass compile test with below commands: make O=outout/all allmodconfig make -j$CPU_NUM O=outout/all drivers/usb Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c4962e03f4
commit
3c9740a117
@@ -2921,6 +2921,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
|
||||
if (retval < 0)
|
||||
goto error3;
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
dwc2_hcd_dump_state(hsotg);
|
||||
|
||||
dwc2_enable_global_interrupts(hsotg);
|
||||
|
||||
@@ -3498,6 +3498,7 @@ static int octeon_usb_driver_probe(struct device *dev)
|
||||
kfree(hcd);
|
||||
return -1;
|
||||
}
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
dev_dbg(dev, "Registered HCD for port %d on irq %d\n", usb_num, irq);
|
||||
|
||||
|
||||
@@ -2270,6 +2270,8 @@ static int oz_plat_probe(struct platform_device *dev)
|
||||
usb_put_hcd(hcd);
|
||||
return -1;
|
||||
}
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
spin_lock_bh(&g_hcdlock);
|
||||
g_ozhcd = ozhcd;
|
||||
spin_unlock_bh(&g_hcdlock);
|
||||
|
||||
@@ -384,6 +384,8 @@ int c67x00_hcd_probe(struct c67x00_sie *sie)
|
||||
goto err2;
|
||||
}
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
spin_lock_irqsave(&sie->lock, flags);
|
||||
sie->private_data = c67x00;
|
||||
sie->irq = c67x00_hcd_irq;
|
||||
|
||||
@@ -282,6 +282,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
|
||||
if (retval != 0)
|
||||
goto unmap_registers;
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
if (pci_dev_run_wake(dev))
|
||||
pm_runtime_put_noidle(&dev->dev);
|
||||
|
||||
@@ -2712,12 +2712,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
|
||||
if (hcd->uses_new_polling && HCD_POLL_RH(hcd))
|
||||
usb_hcd_poll_rh_status(hcd);
|
||||
|
||||
/*
|
||||
* Host controllers don't generate their own wakeup requests;
|
||||
* they only forward requests from the root hub. Therefore
|
||||
* controllers should always be enabled for remote wakeup.
|
||||
*/
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
return retval;
|
||||
|
||||
error_create_attr_group:
|
||||
|
||||
@@ -153,6 +153,7 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
|
||||
retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
||||
if (retval)
|
||||
goto fail_add_hcd;
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
return retval;
|
||||
|
||||
|
||||
@@ -166,6 +166,7 @@ skip_phy:
|
||||
dev_err(&pdev->dev, "Failed to add USB HCD\n");
|
||||
goto fail_add_hcd;
|
||||
}
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
platform_set_drvdata(pdev, hcd);
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
|
||||
retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
||||
if (retval != 0)
|
||||
goto err4;
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
#ifdef CONFIG_USB_OTG
|
||||
if (pdata->operating_mode == FSL_USB2_DR_OTG) {
|
||||
|
||||
@@ -140,6 +140,7 @@ static int ehci_hcd_grlib_probe(struct platform_device *op)
|
||||
if (rv)
|
||||
goto err_ioremap;
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
return 0;
|
||||
|
||||
err_ioremap:
|
||||
|
||||
@@ -257,6 +257,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
|
||||
"failed to add hcd with err %d\n", retval);
|
||||
goto err_set_vbus;
|
||||
}
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
}
|
||||
|
||||
if (pdata->private_init)
|
||||
|
||||
@@ -155,6 +155,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_add;
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
return 0;
|
||||
|
||||
err_add:
|
||||
|
||||
@@ -158,6 +158,7 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev)
|
||||
dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret);
|
||||
goto err3;
|
||||
}
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
platform_set_drvdata(pdev, hcd);
|
||||
|
||||
|
||||
@@ -215,6 +215,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
|
||||
dev_err(dev, "failed to add hcd with err %d\n", ret);
|
||||
goto err_pm_runtime;
|
||||
}
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
|
||||
/*
|
||||
* Bring PHYs out of reset for non PHY modes.
|
||||
|
||||
@@ -252,6 +252,7 @@ static int ehci_orion_drv_probe(struct platform_device *pdev)
|
||||
if (err)
|
||||
goto err4;
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
return 0;
|
||||
|
||||
err4:
|
||||
|
||||
@@ -132,6 +132,7 @@ static int ehci_platform_probe(struct platform_device *dev)
|
||||
if (err)
|
||||
goto err_put_hcd;
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
platform_set_drvdata(dev, hcd);
|
||||
|
||||
return err;
|
||||
|
||||
@@ -210,8 +210,10 @@ int usb_hcd_msp_probe(const struct hc_driver *driver,
|
||||
|
||||
|
||||
retval = usb_add_hcd(hcd, res->start, IRQF_SHARED);
|
||||
if (retval == 0)
|
||||
if (retval == 0) {
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
return 0;
|
||||
}
|
||||
|
||||
usb_remove_hcd(hcd);
|
||||
err3:
|
||||
|
||||
@@ -169,6 +169,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op)
|
||||
if (rv)
|
||||
goto err_ioremap;
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
return 0;
|
||||
|
||||
err_ioremap:
|
||||
|
||||
@@ -189,6 +189,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
|
||||
goto fail_add_hcd;
|
||||
}
|
||||
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
return result;
|
||||
|
||||
fail_add_hcd:
|
||||
|
||||
@@ -126,6 +126,7 @@ static int ehci_hcd_sead3_drv_probe(struct platform_device *pdev)
|
||||
IRQF_SHARED);
|
||||
if (ret == 0) {
|
||||
platform_set_drvdata(pdev, hcd);
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user