这篇教程C++ usb_phy_set_suspend函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中usb_phy_set_suspend函数的典型用法代码示例。如果您正苦于以下问题:C++ usb_phy_set_suspend函数的具体用法?C++ usb_phy_set_suspend怎么用?C++ usb_phy_set_suspend使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了usb_phy_set_suspend函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: dwc3_removestatic int dwc3_remove(struct platform_device *pdev){ struct dwc3 *dwc = platform_get_drvdata(pdev); usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); pm_runtime_disable(&pdev->dev); dwc3_debugfs_exit(dwc); switch (dwc->mode) { case DWC3_MODE_DEVICE: dwc3_gadget_exit(dwc); break; case DWC3_MODE_HOST: dwc3_host_exit(dwc); break; case DWC3_MODE_DRD: dwc3_gadget_exit(dwc); dwc3_host_exit(dwc); dwc3_otg_exit(dwc); break; default: /* do nothing */ break; } dwc3_event_buffers_cleanup(dwc); dwc3_free_event_buffers(dwc); dwc3_core_exit(dwc); return 0;}
开发者ID:AD5GB,项目名称:wicked_kernel_lge_hammerhead,代码行数:34,
示例2: dwc3_suspendstatic int dwc3_suspend(struct device *dev){ struct dwc3 *dwc = dev_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&dwc->lock, flags); switch (dwc->dr_mode) { case USB_DR_MODE_PERIPHERAL: case USB_DR_MODE_OTG: dwc3_gadget_suspend(dwc); /* FALLTHROUGH */ case USB_DR_MODE_HOST: default: dwc3_event_buffers_cleanup(dwc); break; } dwc->gctl = dwc3_readl(dwc->regs, DWC3_GCTL); spin_unlock_irqrestore(&dwc->lock, flags); usb_phy_shutdown(dwc->usb3_phy); usb_phy_shutdown(dwc->usb2_phy); phy_exit(dwc->usb2_generic_phy); phy_exit(dwc->usb3_generic_phy); usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); WARN_ON(phy_power_off(dwc->usb2_generic_phy) < 0); WARN_ON(phy_power_off(dwc->usb3_generic_phy) < 0); pinctrl_pm_select_sleep_state(dev); return 0;}
开发者ID:enclustra-bsp,项目名称:xilinx-linux,代码行数:35,
示例3: dwc3_removestatic int dwc3_remove(struct platform_device *pdev){ struct dwc3 *dwc = platform_get_drvdata(pdev); struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* * restore res->start back to its original value so that, in case the * probe is deferred, we don't end up getting error in request the * memory region the next time probe is called. */ res->start -= DWC3_GLOBALS_REGS_START; dwc3_debugfs_exit(dwc); dwc3_core_exit_mode(dwc); dwc3_event_buffers_cleanup(dwc); dwc3_free_event_buffers(dwc); usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); phy_power_off(dwc->usb2_generic_phy); phy_power_off(dwc->usb3_generic_phy); dwc3_core_exit(dwc); dwc3_ulpi_exit(dwc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0;}
开发者ID:Yerguer,项目名称:linux,代码行数:30,
示例4: dwc3_core_exitstatic void dwc3_core_exit(struct dwc3 *dwc){ dwc3_event_buffers_cleanup(dwc); usb_phy_shutdown(dwc->usb2_phy); usb_phy_shutdown(dwc->usb3_phy); phy_exit(dwc->usb2_generic_phy); phy_exit(dwc->usb3_generic_phy); usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); phy_power_off(dwc->usb2_generic_phy); phy_power_off(dwc->usb3_generic_phy);}
开发者ID:asmalldev,项目名称:linux,代码行数:14,
示例5: dwc3_core_exitstatic void dwc3_core_exit(struct dwc3 *dwc){ usb_phy_shutdown(dwc->usb2_phy); usb_phy_shutdown(dwc->usb3_phy); phy_exit(dwc->usb2_generic_phy); phy_exit(dwc->usb3_generic_phy); usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); phy_power_off(dwc->usb2_generic_phy); phy_power_off(dwc->usb3_generic_phy); clk_bulk_disable(dwc->num_clks, dwc->clks); clk_bulk_unprepare(dwc->num_clks, dwc->clks); reset_control_assert(dwc->reset);}
开发者ID:Xilinx,项目名称:linux-xlnx,代码行数:15,
示例6: ehci_msm_pm_resumestatic int ehci_msm_pm_resume(struct device *dev){ struct usb_hcd *hcd = dev_get_drvdata(dev); int ret; u32 portsc; dev_dbg(dev, "ehci-msm PM resume/n"); if (!hcd->rh_registered) return 0; /* Notify OTG to bring hw out of LPM before restoring wakeup flags */ ret = usb_phy_set_suspend(phy, 0); if (ret) return ret; ehci_resume(hcd, false); portsc = readl_relaxed(USB_PORTSC); portsc &= ~PORT_RWC_BITS; portsc |= PORT_RESUME; writel_relaxed(portsc, USB_PORTSC); /* Resume root-hub to handle USB event if any else initiate LPM again */ usb_hcd_resume_root_hub(hcd); return ret;}
开发者ID:Menpiko,项目名称:SnaPKernel-N6P,代码行数:25,
示例7: ehci_msm_pm_suspendstatic int ehci_msm_pm_suspend(struct device *dev){ struct usb_hcd *hcd = dev_get_drvdata(dev); bool wakeup = device_may_wakeup(dev); dev_dbg(dev, "ehci-msm PM suspend/n"); if (!hcd->rh_registered) return 0; /* * EHCI helper function has also the same check before manipulating * port wakeup flags. We do check here the same condition before * calling the same helper function to avoid bringing hardware * from Low power mode when there is no need for adjusting port * wakeup flags. */ if (hcd->self.root_hub->do_remote_wakeup && !wakeup) { pm_runtime_resume(dev); ehci_prepare_ports_for_controller_suspend(hcd_to_ehci(hcd), wakeup); } return usb_phy_set_suspend(phy, 1);}
开发者ID:itsmerajit,项目名称:kernel_otus,代码行数:25,
示例8: tegra_ehci_bus_suspendstatic int tegra_ehci_bus_suspend(struct usb_hcd *hcd){ struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); int err = 0; EHCI_DBG("%s() BEGIN/n", __func__);#ifdef CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ tegra->boost_requested = false; if (tegra->boost_enable && pm_qos_request_active(&tegra->boost_cpu_freq_req)) pm_qos_update_request(&tegra->boost_cpu_freq_req, PM_QOS_DEFAULT_VALUE); tegra->cpu_boost_in_work = false;#endif mutex_lock(&tegra->sync_lock); tegra->bus_suspended_fail = false; err = ehci_bus_suspend(hcd); if (err) tegra->bus_suspended_fail = true; else usb_phy_set_suspend(get_usb_phy(tegra->phy), 1); mutex_unlock(&tegra->sync_lock); EHCI_DBG("%s() END/n", __func__); return err;}
开发者ID:FrozenCow,项目名称:FIRE-ICE,代码行数:27,
示例9: xhci_msm_runtime_suspendstatic int xhci_msm_runtime_suspend(struct device *dev){ dev_dbg(dev, "xhci msm runtime suspend/n"); if (phy) return usb_phy_set_suspend(phy, 1); return 0;}
开发者ID:mjduddin,项目名称:B14CKB1RD_kernel_m8,代码行数:8,
示例10: tegra_ehci_power_upstatic void tegra_ehci_power_up(struct usb_hcd *hcd){ struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); clk_prepare_enable(tegra->emc_clk); clk_prepare_enable(tegra->clk); usb_phy_set_suspend(&tegra->phy->u_phy, 0); tegra->host_resumed = 1;}
开发者ID:AllenDou,项目名称:linux,代码行数:9,
示例11: tegra_ehci_power_downstatic void tegra_ehci_power_down(struct usb_hcd *hcd){ struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); tegra->host_resumed = 0; usb_phy_set_suspend(&tegra->phy->u_phy, 1); clk_disable_unprepare(tegra->clk); clk_disable_unprepare(tegra->emc_clk);}
开发者ID:AllenDou,项目名称:linux,代码行数:9,
示例12: ehci_msm_runtime_suspendstatic int ehci_msm_runtime_suspend(struct device *dev){ dev_dbg(dev, "ehci runtime suspend/n"); /* * Notify OTG about suspend. It takes care of * putting the hardware in LPM. */ return usb_phy_set_suspend(phy, 1);}
开发者ID:Menpiko,项目名称:SnaPKernel-N6P,代码行数:9,
示例13: ux500_suspendstatic int ux500_suspend(struct device *dev){ struct ux500_glue *glue = dev_get_drvdata(dev); struct musb *musb = glue_to_musb(glue); usb_phy_set_suspend(musb->xceiv, 1); clk_disable(glue->clk); return 0;}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:10,
示例14: ci13xxx_msm_resume_irqstatic irqreturn_t ci13xxx_msm_resume_irq(int irq, void *data){ struct ci13xxx *udc = _udc; if (udc->transceiver && udc->vbus_active && udc->suspended) usb_phy_set_suspend(udc->transceiver, 0); else if (!udc->suspended) ci13xxx_msm_resume(); return IRQ_HANDLED;}
开发者ID:sztablet2016,项目名称:Android-kernel-msm-3.10,代码行数:11,
示例15: usbhs_power_ctrlstatic int usbhs_power_ctrl(struct platform_device *pdev, void __iomem *base, int enable){ struct usbhs_private *priv = usbhs_get_priv(pdev); if (!priv->phy) return -ENODEV; if (enable) { int retval = usb_phy_init(priv->phy); if (!retval) retval = usb_phy_set_suspend(priv->phy, 0); return retval; } usb_phy_set_suspend(priv->phy, 1); usb_phy_shutdown(priv->phy); return 0;}
开发者ID:Etn40ff,项目名称:CI20_linux,代码行数:20,
示例16: ci13xxx_msm_resume_irqstatic irqreturn_t ci13xxx_msm_resume_irq(int irq, void *data){ struct ci13xxx *ci = data; if (ci->transceiver && ci->vbus_active && ci->suspended) usb_phy_set_suspend(ci->transceiver, 0); else if (!ci->suspended) ci13xxx_msm_resume(ci); return IRQ_HANDLED;}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:11,
示例17: ehci_msm_pm_suspendstatic int ehci_msm_pm_suspend(struct device *dev){ struct usb_hcd *hcd = dev_get_drvdata(dev); dev_dbg(dev, "ehci-msm PM suspend/n"); if (!hcd->rh_registered) return 0; return usb_phy_set_suspend(phy, 1);}
开发者ID:Menpiko,项目名称:SnaPKernel-N6P,代码行数:11,
示例18: dwc3_removestatic int dwc3_remove(struct platform_device *pdev){ struct dwc3 *dwc = platform_get_drvdata(pdev); dwc3_debugfs_exit(dwc); dwc3_core_exit_mode(dwc); dwc3_event_buffers_cleanup(dwc); dwc3_free_event_buffers(dwc); usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); phy_power_off(dwc->usb2_generic_phy); phy_power_off(dwc->usb3_generic_phy); dwc3_core_exit(dwc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0;}
开发者ID:Felixneu,项目名称:Power-Management,代码行数:21,
示例19: dwc3_removestatic int dwc3_remove(struct platform_device *pdev){ struct dwc3 *dwc = platform_get_drvdata(pdev); dwc3_debugfs_exit(dwc); switch (dwc->dr_mode) { case USB_DR_MODE_PERIPHERAL: dwc3_gadget_exit(dwc); break; case USB_DR_MODE_HOST: dwc3_host_exit(dwc); break; case USB_DR_MODE_OTG: dwc3_host_exit(dwc); dwc3_gadget_exit(dwc); break; default: /* do nothing */ break; } dwc3_event_buffers_cleanup(dwc); dwc3_free_event_buffers(dwc); usb_phy_set_suspend(dwc->usb2_phy, 1); usb_phy_set_suspend(dwc->usb3_phy, 1); phy_power_off(dwc->usb2_generic_phy); phy_power_off(dwc->usb3_generic_phy); dwc3_core_exit(dwc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0;}
开发者ID:wetek-enigma,项目名称:linux-wetek-3.14.y,代码行数:38,
示例20: tegra_ehci_bus_resumestatic int tegra_ehci_bus_resume(struct usb_hcd *hcd){ struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); int err = 0; EHCI_DBG("%s() BEGIN/n", __func__); mutex_lock(&tegra->sync_lock); usb_phy_set_suspend(get_usb_phy(tegra->phy), 0); err = ehci_bus_resume(hcd); mutex_unlock(&tegra->sync_lock); EHCI_DBG("%s() END/n", __func__); return err;}
开发者ID:Mrchenkeyu,项目名称:android_kernel_zte_pluto,代码行数:14,
示例21: omap2430_runtime_suspendstatic int omap2430_runtime_suspend(struct device *dev){ struct omap2430_glue *glue = dev_get_drvdata(dev); struct musb *musb = glue_to_musb(glue); if (musb) { musb->context.otg_interfsel = musb_readl(musb->mregs, OTG_INTERFSEL); omap2430_low_level_exit(musb); usb_phy_set_suspend(musb->xceiv, 1); } return 0;}
开发者ID:Cool-Joe,项目名称:imx23-audio,代码行数:15,
示例22: omap2430_runtime_resumestatic int omap2430_runtime_resume(struct device *dev){ struct omap2430_glue *glue = dev_get_drvdata(dev); struct musb *musb = glue_to_musb(glue); if (musb) { omap2430_low_level_init(musb); musb_writel(musb->mregs, OTG_INTERFSEL, musb->context.otg_interfsel); usb_phy_set_suspend(musb->xceiv, 0); } return 0;}
开发者ID:Cool-Joe,项目名称:imx23-audio,代码行数:15,
示例23: ux500_resumestatic int ux500_resume(struct device *dev){ struct ux500_glue *glue = dev_get_drvdata(dev); struct musb *musb = glue_to_musb(glue); int ret; ret = clk_enable(glue->clk); if (ret) { dev_err(dev, "failed to enable clock/n"); return ret; } usb_phy_set_suspend(musb->xceiv, 0); return 0;}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:16,
示例24: tegra_ehci_bus_suspendstatic int tegra_ehci_bus_suspend(struct usb_hcd *hcd){ struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); int err = 0; EHCI_DBG("%s() BEGIN/n", __func__); mutex_lock(&tegra->sync_lock); tegra->bus_suspended_fail = false; err = ehci_bus_suspend(hcd); if (err) tegra->bus_suspended_fail = true; else usb_phy_set_suspend(get_usb_phy(tegra->phy), 1); mutex_unlock(&tegra->sync_lock); EHCI_DBG("%s() END/n", __func__); return err;}
开发者ID:Mrchenkeyu,项目名称:android_kernel_zte_pluto,代码行数:17,
示例25: ehci_msm_runtime_resumestatic int ehci_msm_runtime_resume(struct device *dev){ struct usb_hcd *hcd = dev_get_drvdata(dev); int ret; u32 portsc; dev_dbg(dev, "ehci runtime resume/n"); ret = usb_phy_set_suspend(phy, 0); if (ret) return ret; portsc = readl_relaxed(USB_PORTSC); portsc &= ~PORT_RWC_BITS; portsc |= PORT_RESUME; writel_relaxed(portsc, USB_PORTSC); return ret;}
开发者ID:Menpiko,项目名称:SnaPKernel-N6P,代码行数:18,
示例26: ehci_msm_bus_resumestatic int ehci_msm_bus_resume(struct usb_hcd *hcd){ struct msmusb_hcd *mhcd = hcd_to_mhcd(hcd); struct device *dev = hcd->self.controller; wake_lock(&mhcd->wlock); pm_runtime_get_noresume(dev); pm_runtime_resume(dev); if (PHY_TYPE(mhcd->pdata->phy_info) == USB_PHY_INTEGRATED) { usb_phy_set_suspend(mhcd->xceiv, 0); } else { /* PMIC serial phy */ usb_lpm_exit(hcd); if (cancel_work_sync(&(mhcd->lpm_exit_work))) usb_lpm_exit_w(&mhcd->lpm_exit_work); } return ehci_bus_resume(hcd);}
开发者ID:weritos666,项目名称:ARCHOS_50_Platinum,代码行数:20,
示例27: ehci_msm_pm_resumestatic int ehci_msm_pm_resume(struct device *dev){ struct usb_hcd *hcd = dev_get_drvdata(dev); int ret; dev_dbg(dev, "ehci-msm PM resume/n"); if (!hcd->rh_registered) return 0; /* Notify OTG to bring hw out of LPM before restoring wakeup flags */ ret = usb_phy_set_suspend(phy, 0); if (ret) return ret; ehci_prepare_ports_for_controller_resume(hcd_to_ehci(hcd)); /* Resume root-hub to handle USB event if any else initiate LPM again */ usb_hcd_resume_root_hub(hcd); return ret;}
开发者ID:itsmerajit,项目名称:kernel_otus,代码行数:21,
示例28: ehci_msm_bus_suspendstatic int ehci_msm_bus_suspend(struct usb_hcd *hcd){ int ret; struct msmusb_hcd *mhcd = hcd_to_mhcd(hcd); struct device *dev = hcd->self.controller; ret = ehci_bus_suspend(hcd); if (ret) { pr_err("ehci_bus suspend faield/n"); return ret; } if (PHY_TYPE(mhcd->pdata->phy_info) == USB_PHY_INTEGRATED) ret = usb_phy_set_suspend(mhcd->xceiv, 1); else ret = usb_lpm_enter(hcd); pm_runtime_put_noidle(dev); pm_runtime_suspend(dev); wake_unlock(&mhcd->wlock); return ret;}
开发者ID:weritos666,项目名称:ARCHOS_50_Platinum,代码行数:21,
注:本文中的usb_phy_set_suspend函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ usb_phy_shutdown函数代码示例 C++ usb_phy_init函数代码示例 |