Ejemplo n.º 1
0
static int s5p_ehci_suspend(struct device *dev)
{
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd);
	struct platform_device *pdev = to_platform_device(dev);

	bool do_wakeup = device_may_wakeup(dev);
	int rc;

	rc = ehci_suspend(hcd, do_wakeup);

	if (s5p_ehci->otg)
		s5p_ehci->otg->set_host(s5p_ehci->otg, &hcd->self);

	if (s5p_ehci->phy) {
		/* Shutdown PHY only if it wasn't shutdown before */
		if (!s5p_ehci->post_lpa_resume)
			usb_phy_shutdown(s5p_ehci->phy);
	} else if (s5p_ehci->pdata->phy_exit) {
		s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
	}

	s5p_ehci_clk_disable_unprepare(s5p_ehci);

	return rc;
}
Ejemplo n.º 2
0
static int ehci_spear_drv_suspend(struct device *dev)
{
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	bool do_wakeup = device_may_wakeup(dev);

	return ehci_suspend(hcd, do_wakeup);
}
Ejemplo n.º 3
0
static int ehci_msm_pm_suspend(struct device *dev)
{
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	bool do_wakeup = device_may_wakeup(dev);

	dev_dbg(dev, "ehci-msm PM suspend\n");

	return ehci_suspend(hcd, do_wakeup);
}
Ejemplo n.º 4
0
static int hiusb_ehci_hcd_drv_suspend(struct device *dev)
{
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	bool do_wakeup = device_may_wakeup(dev);
	int rc = 0;

	rc =  ehci_suspend(hcd, do_wakeup);

	hiusb_stop_hcd();
	return rc;
}
Ejemplo n.º 5
0
static int ehci_rkhsic_pm_suspend(struct device *dev)
{
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	bool do_wakeup = device_may_wakeup(dev);
	int ret;

	dev_dbg(dev, "ehci-rkhsic PM suspend\n");
	ret = ehci_suspend(hcd, do_wakeup);

	return ret;
}
Ejemplo n.º 6
0
static int
ehci_ebus_suspend(device_t self)
{
	ehci_softc_t *sc = device_get_softc(self);
	int err;

	err = bus_generic_suspend(self);
	if (err)
		return (err);
	ehci_suspend(sc);
	return (0);
}
static int ehci_platform_suspend(struct device *dev)
{
    struct usb_hcd *hcd = dev_get_drvdata(dev);
    struct usb_ehci_pdata *pdata = dev->platform_data;
    struct platform_device *pdev =
        container_of(dev, struct platform_device, dev);
    bool do_wakeup = device_may_wakeup(dev);
    int ret;

    ret = ehci_suspend(hcd, do_wakeup);

    if (pdata->power_suspend)
        pdata->power_suspend(pdev);

    return ret;
}
Ejemplo n.º 8
0
static int st_ehci_suspend(struct device *dev)
{
    struct usb_hcd *hcd = dev_get_drvdata(dev);
    struct usb_ehci_pdata *pdata = dev_get_platdata(dev);
    struct platform_device *pdev = to_platform_device(dev);
    bool do_wakeup = device_may_wakeup(dev);
    int ret;

    ret = ehci_suspend(hcd, do_wakeup);
    if (ret)
        return ret;

    if (pdata->power_suspend)
        pdata->power_suspend(pdev);

    pinctrl_pm_select_sleep_state(dev);

    return ret;
}
static int exynos_ehci_suspend(struct device *dev)
{
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd);

	bool do_wakeup = device_may_wakeup(dev);
	int rc;

	rc = ehci_suspend(hcd, do_wakeup);

	if (exynos_ehci->otg)
		exynos_ehci->otg->set_host(exynos_ehci->otg, &hcd->self);

	if (exynos_ehci->phy)
		usb_phy_shutdown(exynos_ehci->phy);

	clk_disable_unprepare(exynos_ehci->clk);

	return rc;
}
Ejemplo n.º 10
0
static int s5p_ehci_runtime_suspend(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct s5p_ehci_platdata *pdata = pdev->dev.platform_data;
	struct usb_hcd *hcd = platform_get_drvdata(pdev);
	struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd);
	bool do_wakeup = device_may_wakeup(dev);
	int rc;

	dev_dbg(dev, "%s\n", __func__);

	rc = ehci_suspend(hcd, do_wakeup);

	if (s5p_ehci->phy)
		pm_runtime_put_sync(s5p_ehci->phy->dev);
	else if (pdata && pdata->phy_suspend)
		pdata->phy_suspend(pdev, USB_PHY_TYPE_HOST);

	return rc;
}
Ejemplo n.º 11
0
static int ehci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
{
	return ehci_suspend(hcd, do_wakeup);
}