当前位置: 首页>>代码示例>>C++>>正文


C++ ehci_to_hcd函数代码示例

本文整理汇总了C++中ehci_to_hcd函数的典型用法代码示例。如果您正苦于以下问题:C++ ehci_to_hcd函数的具体用法?C++ ehci_to_hcd怎么用?C++ ehci_to_hcd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ehci_to_hcd函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ehci_msm_start_hnp

static void ehci_msm_start_hnp(struct ehci_hcd *ehci)
{
	struct usb_hcd *hcd = ehci_to_hcd(ehci);
	struct msmusb_hcd *mhcd = hcd_to_mhcd(hcd);

	/* OTG driver handles HNP */
	otg_start_hnp(mhcd->xceiv);
}
开发者ID:Amin-jkr,项目名称:android_kernel_semc_msm8660-1,代码行数:8,代码来源:ehci-msm72k.c

示例2: tegra_ehci_hcd_shutdown

static void tegra_ehci_hcd_shutdown(struct platform_device *pdev)
{
	struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev);
	struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci);

	if (hcd->driver->shutdown)
		hcd->driver->shutdown(hcd);
}
开发者ID:FrozenCow,项目名称:FIRE-ICE,代码行数:8,代码来源:ehci-tegra.c

示例3: ehci_hcd_omap_shutdown

static void ehci_hcd_omap_shutdown(struct platform_device *pdev)
{
	struct ehci_hcd_omap *omap = platform_get_drvdata(pdev);
	struct usb_hcd *hcd = ehci_to_hcd(omap->ehci);

	if (hcd->driver->shutdown)
		hcd->driver->shutdown(hcd);
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:8,代码来源:ehci-omap.c

示例4: berlin_ehci_shutdown

static void berlin_ehci_shutdown(struct platform_device *pdev)
{
    struct berlin_ehci_hcd *berlin = platform_get_drvdata(pdev);
    struct usb_hcd *hcd = ehci_to_hcd(berlin->ehci);

    if (hcd->driver->shutdown)
        hcd->driver->shutdown(hcd);
}
开发者ID:rhamilton1415,项目名称:steamlink-sdk,代码行数:8,代码来源:ehci-berlin.c

示例5: ar9130_start_hc

static int ar9130_start_hc(struct ehci_hcd *ehci, struct device *dev)
{
printk ("ar9130_start_hc %p, %p\n", ehci_to_hcd(ehci), &ehci_to_hcd(ehci)->self);
	if (ehci->transceiver) {
		int status = otg_set_host(ehci->transceiver,
					&ehci_to_hcd(ehci)->self);
		dev_info(dev, "init %s transceiver, status %d\n",
				ehci->transceiver->label, status);
		if (status) {
			if (ehci->transceiver)
				put_device(ehci->transceiver->dev);
		}
		return status;
	} else {
		dev_err(dev, "can't find transceiver\n");
		return -ENODEV;
	}
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:18,代码来源:ehci-ar9130.c

示例6: tegra_ehci_remove

static int tegra_ehci_remove(struct platform_device *pdev)
{
	struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev);
	struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci);

	dev_info(&pdev->dev, "%s+\n", __func__);		//htc_dbg

	if (tegra == NULL || hcd == NULL)
		return -EINVAL;

#ifdef CONFIG_USB_OTG_UTILS
	if (tegra->transceiver) {
		otg_set_host(tegra->transceiver, NULL);
		otg_put_transceiver(tegra->transceiver);
	}
#endif

	if (tegra->irq)
		disable_irq_wake(tegra->irq);

	/* Make sure phy is powered ON to access USB register */
	if(!tegra_usb_phy_hw_accessible(tegra->phy))
		tegra_usb_phy_power_on(tegra->phy);

	pr_info("+%s:usb_remove_hcd\n", __func__);
	uhsic_phy_remove(tegra->phy);
	usb_remove_hcd(hcd);
	usb_put_hcd(hcd);
	ehci_remove = 1;
	tegra_usb_phy_power_off(tegra->phy);
	tegra_usb_phy_close(tegra->phy);
	iounmap(hcd->regs);
	platform_set_drvdata(pdev, NULL);

	//htc++
	#ifdef CONFIG_QCT_9K_MODEM
	if (Modem_is_QCT_MDM9K())
	{
		extern struct platform_device tegra_ehci2_device;

		if (&tegra_ehci2_device == pdev)
		{
			mdm_hsic_ehci_hcd = NULL;
			mdm_hsic_usb_hcd = NULL;
			mdm_hsic_phy = NULL;
			pr_info("%s:: mdm_hsic_ehci_hcd = %x, mdm_hsic_usb_hcd = %x, mdm_hsic_phy = %x\n",
				__func__, (unsigned int)mdm_hsic_ehci_hcd, (unsigned int)mdm_hsic_usb_hcd, (unsigned int)mdm_hsic_phy);
		}
	}
	#endif	//CONFIG_QCT_9K_MODEM
	//htc--

	dev_info(&pdev->dev, "%s-\n", __func__);		//htc_dbg

	return 0;
}
开发者ID:denkem,项目名称:enru-3.1.10-g7f360be,代码行数:56,代码来源:ehci-tegra.c

示例7: remove_sysfs_files

static inline void remove_sysfs_files(struct ehci_hcd *ehci)
{
    struct device	*controller = ehci_to_hcd(ehci)->self.controller;

    /* with integrated TT there is no companion! */
    if (!ehci_is_TDI(ehci))
        device_remove_file(controller, &dev_attr_companion);

    device_remove_file(controller, &dev_attr_uframe_periodic_max);
}
开发者ID:jgroen,项目名称:rtt_tests,代码行数:10,代码来源:ehci-sysfs.c

示例8: ehci_hcd_omap_hack_handler

static irqreturn_t ehci_hcd_omap_hack_handler(int irq, void *dev)
{
	struct ehci_hcd_omap *omap = dev_get_drvdata(dev);
	struct ehci_hcd *ehci = omap->ehci;
        struct usb_hcd *hcd = ehci_to_hcd(ehci);

	/* resume root hub? */
	usb_hcd_resume_root_hub(hcd);
	
	return IRQ_HANDLED;
}
开发者ID:Aircell,项目名称:asp-kernel,代码行数:11,代码来源:ehci-omap.c

示例9: s5p_ehci_runtime_resume

static int s5p_ehci_runtime_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct s5p_ehci_platdata *pdata = pdev->dev.platform_data;
	struct s5p_ehci_hcd *s5p_ehci = platform_get_drvdata(pdev);
	struct usb_hcd *hcd = s5p_ehci->hcd;
	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
	int rc = 0;

	if (dev->power.is_suspended)
		return 0;

	/* platform device isn't suspended */
	if (pdata && pdata->phy_resume)
		rc = pdata->phy_resume(pdev, S5P_USB_PHY_HOST);

	if (rc) {
		s5p_ehci_configurate(hcd);

		/* emptying the schedule aborts any urbs */
		spin_lock_irq(&ehci->lock);
		if (ehci->reclaim)
			end_unlink_async(ehci);
		ehci_work(ehci);
		spin_unlock_irq(&ehci->lock);

		usb_root_hub_lost_power(hcd->self.root_hub);

		ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);
		ehci_writel(ehci, INTR_MASK, &ehci->regs->intr_enable);
		(void)ehci_readl(ehci, &ehci->regs->intr_enable);

		/* here we "know" root ports should always stay powered */
		ehci_port_power(ehci, 1);

		hcd->state = HC_STATE_SUSPENDED;
#if 0//def CONFIG_USB_EXYNOS_SWITCH
	} else {
		if (1) //samsung_board_rev_is_0_0()) /* the same board configuration that Mehmet DVT has */
		{
			ehci_hub_control(ehci_to_hcd(ehci),
					SetPortFeature,
					USB_PORT_FEAT_POWER,
					1, NULL, 0);
			/* Flush those writes */
			ehci_readl(ehci, &ehci->regs->command);
			msleep(20);
		}
#endif
	}

	return 0;
}
开发者ID:ugur2323,项目名称:Whispermehmet_VE,代码行数:53,代码来源:ehci-s5p.c

示例10: berlin_ehci_remove

static int berlin_ehci_remove(struct platform_device *pdev)
{
    struct berlin_ehci_hcd *berlin = platform_get_drvdata(pdev);
    struct usb_hcd *hcd = ehci_to_hcd(berlin->ehci);

    mv_stop_ehc(hcd);
    usb_remove_hcd(hcd);
    iounmap(hcd->regs);
    release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
    usb_put_hcd(hcd);

    return 0;
}
开发者ID:rhamilton1415,项目名称:steamlink-sdk,代码行数:13,代码来源:ehci-berlin.c

示例11: ehci_hcd_omap_shutdown

static void ehci_hcd_omap_shutdown(struct platform_device *pdev)
{
	struct ehci_hcd_omap *omap = platform_get_drvdata(pdev);
	struct usb_hcd *hcd = ehci_to_hcd(omap->ehci);
	struct uhhtll_apis *uhhtllp = pdev->dev.platform_data;
	int ret = 0;

	if (uhhtllp && uhhtllp->resume)
		ret = uhhtllp->resume(OMAP_EHCI);

	if (!ret && hcd->driver->shutdown)
		hcd->driver->shutdown(hcd);
}
开发者ID:SunRain,项目名称:kernel_mapphone_kexec,代码行数:13,代码来源:ehci-omap.c

示例12: tegra_ehci_remove

static int tegra_ehci_remove(struct platform_device *pdev)
{
	struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev);
	struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci);
	struct usb_device *rhdev = NULL;
	struct tegra_usb_platform_data *pdata;
	unsigned long timeout = 0;

	wake_lock_destroy(&tegra->ehci_wake_lock);

#ifdef CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ
	cancel_delayed_work_sync(&tegra->boost_cpu_freq_work);
	tegra->cpu_boost_in_work = false;
	pm_qos_remove_request(&tegra->boost_cpu_freq_req);
#endif
	rhdev = hcd->self.root_hub;
	pdata = dev_get_platdata(&pdev->dev);

	if (!IS_ERR_OR_NULL(tegra->transceiver))
		otg_set_host(tegra->transceiver->otg, NULL);

	/* Make sure phy is powered ON to access USB register */
	if(!tegra_usb_phy_hw_accessible(tegra->phy))
		tegra_usb_phy_power_on(tegra->phy);

	if (pdata->port_otg) {
		timeout = jiffies + 5 * HZ;
		/* wait for devices connected to root hub to disconnect*/
		while (rhdev && usb_hub_find_child(rhdev, 1)) {
			/* wait for any control packets
			sent to root hub to complete */
			if (time_after(jiffies, timeout))
				break;
			msleep(20);
			cpu_relax();
		}
	}

#ifdef CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ
	device_remove_file(hcd->self.controller, &dev_attr_boost_enable);
#endif
	usb_remove_hcd(hcd);
	usb_put_hcd(hcd);
	tegra_usb_phy_power_off(tegra->phy);
	usb_phy_shutdown(get_usb_phy(tegra->phy));

	mutex_destroy(&tegra->sync_lock);
	tegra_pd_remove_device(&pdev->dev);

	return 0;
}
开发者ID:FrozenCow,项目名称:FIRE-ICE,代码行数:51,代码来源:ehci-tegra.c

示例13: ehci_hcd_omap_remove

/**
 * ehci_hcd_omap_remove - shutdown processing for EHCI HCDs
 * @pdev: USB Host Controller being removed
 *
 * Reverses the effect of usb_ehci_hcd_omap_probe(), first invoking
 * the HCD's stop() method.  It is always called from a thread
 * context, normally "rmmod", "apmd", or something similar.
 */
static int ehci_hcd_omap_remove(struct platform_device *pdev)
{
	struct ehci_hcd_omap *omap = platform_get_drvdata(pdev);
	struct usb_hcd *hcd = ehci_to_hcd(omap->ehci);

	usb_remove_hcd(hcd);
	omap_stop_ehc(omap, hcd);
	iounmap(hcd->regs);
	iounmap(omap->tll_base);
	iounmap(omap->uhh_base);
	usb_put_hcd(hcd);

	return 0;
}
开发者ID:friackazoid,项目名称:linux-2.6,代码行数:22,代码来源:ehci-omap.c

示例14: ehci_port_power

static void ehci_port_power (struct ehci_hcd *ehci, int is_on)
{
	unsigned port;

	if (!HCS_PPC (ehci->hcs_params))
		return;

	ehci_dbg (ehci, "...power%s ports...\n", is_on ? "up" : "down");
	for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; )
		(void) ehci_hub_control(ehci_to_hcd(ehci),
				is_on ? SetPortFeature : ClearPortFeature,
				USB_PORT_FEAT_POWER,
				port--, NULL, 0);
	msleep(20);
}
开发者ID:foxsat-hdr,项目名称:linux-kernel,代码行数:15,代码来源:ehci-hcd.c

示例15: handshake_on_error_set_halt

static int handshake_on_error_set_halt(struct ehci_hcd *ehci, void __iomem *ptr,
				       u32 mask, u32 done, int usec)
{
	int error;

	error = handshake(ehci, ptr, mask, done, usec);
	if (error) {
		ehci_halt(ehci);
		ehci_to_hcd(ehci)->state = HC_STATE_HALT;
		ehci_err(ehci, "force halt; handhake %p %08x %08x -> %d\n",
			ptr, mask, done, error);
	}

	return error;
}
开发者ID:franjoweb,项目名称:liquid_chocolate_ics_kernel,代码行数:15,代码来源:ehci-hcd.c


注:本文中的ehci_to_hcd函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。