本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}