这篇教程C++ usbhs_get_priv函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中usbhs_get_priv函数的典型用法代码示例。如果您正苦于以下问题:C++ usbhs_get_priv函数的具体用法?C++ usbhs_get_priv怎么用?C++ usbhs_get_priv使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了usbhs_get_priv函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: usbhs_hardware_initstatic int usbhs_hardware_init(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); struct usb_phy *phy; int ret; /* USB0 Function - use PWEN as GPIO input to detect DIP Switch SW5 * setting to avoid VBUS short circuit due to wrong cable. * PWEN should be pulled up high if USB Function is selected by SW5 */ gpio_request_one(RCAR_GP_PIN(5, 18), GPIOF_IN, NULL); /* USB0_PWEN */ if (!gpio_get_value(RCAR_GP_PIN(5, 18))) { pr_warn("Error: USB Function not selected - check SW5 + SW6/n"); ret = -ENOTSUPP; goto error; } phy = usb_get_phy_dev(&pdev->dev, 0); if (IS_ERR(phy)) { ret = PTR_ERR(phy); goto error; } priv->phy = phy; return 0; error: gpio_free(RCAR_GP_PIN(5, 18)); return ret;}
开发者ID:Etn40ff,项目名称:CI20_linux,代码行数:29,
示例2: usbhs_phy_resetstatic void usbhs_phy_reset(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); /* init phy */ __raw_writew(0x8a0a, priv->usbcrcaddr);}
开发者ID:aayushahuja,项目名称:linux,代码行数:7,
示例3: usbhs0_hardware_exitstatic int usbhs0_hardware_exit(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); cancel_delayed_work_sync(&priv->work); return 0;}
开发者ID:rzr,项目名称:rcar-m2-tizen-kernel,代码行数:8,
示例4: usbhs1_hardware_exitstatic void usbhs1_hardware_exit(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); /* clear interrupt status */ __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); free_irq(IRQ8, pdev);}
开发者ID:aayushahuja,项目名称:linux,代码行数:9,
示例5: usbhs0_hardware_initstatic int usbhs0_hardware_init(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); priv->pdev = pdev; INIT_DELAYED_WORK(&priv->work, usbhs0_work_function); schedule_delayed_work(&priv->work, USBHS0_POLL_INTERVAL); return 0;}
开发者ID:aayushahuja,项目名称:linux,代码行数:9,
示例6: usbhs_phy_resetstatic int usbhs_phy_reset(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); /* init phy */ __raw_writew(0x8a0a, priv->cr2); return 0;}
开发者ID:Mr-L7,项目名称:linux,代码行数:9,
示例7: usbhs_hardware_exitstatic int usbhs_hardware_exit(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); /* clear interrupt status */ __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->phy); free_irq(IRQ15, pdev); return 0;}
开发者ID:Mr-L7,项目名称:linux,代码行数:11,
示例8: usbhs_interruptstatic irqreturn_t usbhs_interrupt(int irq, void *data){ struct platform_device *pdev = data; struct usbhs_private *priv = usbhs_get_priv(pdev); renesas_usbhs_call_notify_hotplug(pdev); /* clear status */ __raw_writew(__raw_readw(priv->phy) | USB_PHY_INT_CLR, priv->phy); return IRQ_HANDLED;}
开发者ID:Mr-L7,项目名称:linux,代码行数:12,
示例9: usbhs_hardware_exitstatic int usbhs_hardware_exit(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); if (!priv->phy) return 0; usb_put_phy(priv->phy); priv->phy = NULL; gpio_free(RCAR_GP_PIN(5, 18)); return 0;}
开发者ID:Etn40ff,项目名称:CI20_linux,代码行数:13,
示例10: usbhs1_interruptstatic irqreturn_t usbhs1_interrupt(int irq, void *data){ struct platform_device *pdev = data; struct usbhs_private *priv = usbhs_get_priv(pdev); dev_dbg(&pdev->dev, "%s/n", __func__); renesas_usbhs_call_notify_hotplug(pdev); /* clear status */ __raw_writew(__raw_readw(priv->usbphyaddr) | USB_PHY_INT_CLR, priv->usbphyaddr); return IRQ_HANDLED;}
开发者ID:aayushahuja,项目名称:linux,代码行数:15,
示例11: usbhs1_hardware_initstatic int usbhs1_hardware_init(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); int ret; /* clear interrupt status */ __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); ret = request_irq(IRQ8, usbhs1_interrupt, IRQF_TRIGGER_HIGH, dev_name(&pdev->dev), pdev); if (ret) { dev_err(&pdev->dev, "request_irq err/n"); return ret; } /* enable USB phy interrupt */ __raw_writew(USB_PHY_MODE | USB_PHY_INT_EN, priv->usbphyaddr); return 0;}
开发者ID:aayushahuja,项目名称:linux,代码行数:20,
示例12: 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,
示例13: usbhs_get_vbusstatic int usbhs_get_vbus(struct platform_device *pdev){ return usbhs_is_connected(usbhs_get_priv(pdev));}
开发者ID:aayushahuja,项目名称:linux,代码行数:4,
示例14: usbhs_get_vbusstatic int usbhs_get_vbus(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); return !((1 << 7) & __raw_readw(priv->cr2));}
开发者ID:Mr-L7,项目名称:linux,代码行数:6,
示例15: koelsch_add_rsnd_device//.........这里部分代码省略......... .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,};static struct sh_mobile_sdhi_info sdhi2_info __initdata = { .dma_slave_tx = SYS_DMAC_SLAVE_SDHI2_TX, .dma_slave_rx = SYS_DMAC_SLAVE_SDHI2_RX, .dma_rx_offset = 0x2000, .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | MMC_CAP_POWER_OFF_CARD, .tmio_caps = MMC_CAP_POWER_OFF_CARD, .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,};/* USBHS */static const struct resource usbhs_resources[] __initconst = { DEFINE_RES_MEM(0xe6590000, 0x100), DEFINE_RES_IRQ(gic_spi(107)),};struct usbhs_private { struct renesas_usbhs_platform_info info; struct usb_phy *phy; int id_gpio;};#define usbhs_get_priv(pdev) / container_of(renesas_usbhs_get_info(pdev), struct usbhs_private, info)static 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;}static int usbhs_hardware_init(struct platform_device *pdev){ struct usbhs_private *priv = usbhs_get_priv(pdev); struct usb_phy *phy; int ret; struct device_node *np; np = of_find_node_by_path("/[email C++ usbhs_init函数代码示例 C++ usbhid_submit_report函数代码示例
|