otg 537 arch/arm/mach-imx/mach-armadillo5x0.c usbotg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 539 arch/arm/mach-imx/mach-armadillo5x0.c if (usbotg_pdata.otg) otg 541 arch/arm/mach-imx/mach-armadillo5x0.c usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 543 arch/arm/mach-imx/mach-armadillo5x0.c if (usbh2_pdata.otg) otg 409 arch/arm/mach-imx/mach-mx27_3ds.c otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 412 arch/arm/mach-imx/mach-mx27_3ds.c if (otg_pdata.otg) otg 575 arch/arm/mach-imx/mach-mx31_3ds.c otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 577 arch/arm/mach-imx/mach-mx31_3ds.c if (otg_pdata.otg) otg 580 arch/arm/mach-imx/mach-mx31_3ds.c usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 582 arch/arm/mach-imx/mach-mx31_3ds.c if (usbh2_pdata.otg) otg 212 arch/arm/mach-imx/mach-mx31lilly.c usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 214 arch/arm/mach-imx/mach-mx31lilly.c if (usbh2_pdata.otg) otg 271 arch/arm/mach-imx/mach-mx31lite.c usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 273 arch/arm/mach-imx/mach-mx31lite.c if (usbh2_pdata.otg) otg 412 arch/arm/mach-imx/mach-mx31moboard.c usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 414 arch/arm/mach-imx/mach-mx31moboard.c if (!usbh2_pdata.otg) otg 386 arch/arm/mach-imx/mach-pca100.c otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 389 arch/arm/mach-imx/mach-pca100.c if (otg_pdata.otg) otg 396 arch/arm/mach-imx/mach-pca100.c usbh2_pdata.otg = imx_otg_ulpi_create( otg 399 arch/arm/mach-imx/mach-pca100.c if (usbh2_pdata.otg) otg 527 arch/arm/mach-imx/mach-pcm037.c otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 529 arch/arm/mach-imx/mach-pcm037.c if (otg_pdata.otg) otg 533 arch/arm/mach-imx/mach-pcm037.c usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 535 arch/arm/mach-imx/mach-pcm037.c if (usbh2_pdata.otg) otg 376 arch/arm/mach-imx/mach-pcm043.c otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 378 arch/arm/mach-imx/mach-pcm043.c if (otg_pdata.otg) otg 153 arch/arm/mach-imx/mx31moboard-devboard.c static int devboard_isp1105_init(struct usb_phy *otg) otg 172 arch/arm/mach-imx/mx31moboard-devboard.c static int devboard_isp1105_set_vbus(struct usb_otg *otg, bool on) otg 196 arch/arm/mach-imx/mx31moboard-devboard.c phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); otg 197 arch/arm/mach-imx/mx31moboard-devboard.c if (!phy->otg) { otg 204 arch/arm/mach-imx/mx31moboard-devboard.c phy->otg->set_vbus = devboard_isp1105_set_vbus; otg 206 arch/arm/mach-imx/mx31moboard-devboard.c usbh1_pdata.otg = phy; otg 178 arch/arm/mach-imx/mx31moboard-marxbot.c static int marxbot_isp1105_init(struct usb_phy *otg) otg 197 arch/arm/mach-imx/mx31moboard-marxbot.c static int marxbot_isp1105_set_vbus(struct usb_otg *otg, bool on) otg 221 arch/arm/mach-imx/mx31moboard-marxbot.c phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); otg 222 arch/arm/mach-imx/mx31moboard-marxbot.c if (!phy->otg) { otg 229 arch/arm/mach-imx/mx31moboard-marxbot.c phy->otg->set_vbus = marxbot_isp1105_set_vbus; otg 231 arch/arm/mach-imx/mx31moboard-marxbot.c usbh1_pdata.otg = phy; otg 59 arch/arm/mach-imx/mx31moboard-smartbot.c otg_host_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg 61 arch/arm/mach-imx/mx31moboard-smartbot.c if (!otg_host_pdata.otg) otg 42 arch/arm/mach-omap1/board-generic.c .otg = 1, otg 343 arch/arm/mach-omap1/board-h2.c .otg = 2, otg 364 arch/arm/mach-omap1/board-h3.c .otg = 2, otg 371 arch/arm/mach-omap1/board-htcherald.c .otg = 0, otg 310 arch/arm/mach-omap1/board-innovator.c .otg = 2, otg 151 arch/arm/mach-omap1/board-nokia770.c .otg = 1, otg 286 arch/arm/mach-omap1/board-sx1.c .otg = 0, otg 75 arch/arm/mach-omap1/usb.c if (config->otg) otg 93 arch/arm/mach-omap1/usb.c if (config->otg) otg 94 arch/arm/mach-omap1/usb.c pr_cont(", Mini-AB on usb%d", config->otg - 1); otg 111 arch/arm/mach-omap1/usb.c if (config->otg || config->register_dev) { otg 124 arch/arm/mach-omap1/usb.c if (config->otg || config->register_host) { otg 137 arch/arm/mach-omap1/usb.c if (config->otg) { otg 33 arch/arm/mach-pxa/pxa3xx-ulpi.c struct usb_phy *otg; otg 79 arch/arm/mach-pxa/pxa3xx-ulpi.c static int pxa310_ulpi_read(struct usb_phy *otg, u32 reg) otg 98 arch/arm/mach-pxa/pxa3xx-ulpi.c static int pxa310_ulpi_write(struct usb_phy *otg, u32 val, u32 reg) otg 139 arch/arm/mach-pxa/pxa3xx-ulpi.c err = usb_phy_init(u2d->otg); otg 145 arch/arm/mach-pxa/pxa3xx-ulpi.c err = otg_set_vbus(u2d->otg->otg, 1); otg 151 arch/arm/mach-pxa/pxa3xx-ulpi.c err = otg_set_host(u2d->otg->otg, host); otg 189 arch/arm/mach-pxa/pxa3xx-ulpi.c otg_set_host(u2d->otg->otg, NULL); otg 190 arch/arm/mach-pxa/pxa3xx-ulpi.c otg_set_vbus(u2d->otg->otg, 0); otg 191 arch/arm/mach-pxa/pxa3xx-ulpi.c usb_phy_shutdown(u2d->otg); otg 221 arch/arm/mach-pxa/pxa3xx-ulpi.c u2d->otg = otg_ulpi_create(&pxa310_ulpi_access_ops, ulpi_mode); otg 222 arch/arm/mach-pxa/pxa3xx-ulpi.c if (!u2d->otg) otg 225 arch/arm/mach-pxa/pxa3xx-ulpi.c u2d->otg->io_priv = u2d->mmio_base; otg 232 arch/arm/mach-pxa/pxa3xx-ulpi.c kfree(u2d->otg); otg 152 drivers/phy/motorola/phy-cpcap-usb.c static int cpcap_usb_phy_set_host(struct usb_otg *otg, struct usb_bus *host) otg 154 drivers/phy/motorola/phy-cpcap-usb.c otg->host = host; otg 156 drivers/phy/motorola/phy-cpcap-usb.c otg->state = OTG_STATE_UNDEFINED; otg 161 drivers/phy/motorola/phy-cpcap-usb.c static int cpcap_usb_phy_set_peripheral(struct usb_otg *otg, otg 164 drivers/phy/motorola/phy-cpcap-usb.c otg->gadget = gadget; otg 166 drivers/phy/motorola/phy-cpcap-usb.c otg->state = OTG_STATE_UNDEFINED; otg 585 drivers/phy/motorola/phy-cpcap-usb.c struct usb_otg *otg; otg 602 drivers/phy/motorola/phy-cpcap-usb.c otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); otg 603 drivers/phy/motorola/phy-cpcap-usb.c if (!otg) otg 609 drivers/phy/motorola/phy-cpcap-usb.c ddata->phy.otg = otg; otg 611 drivers/phy/motorola/phy-cpcap-usb.c otg->set_host = cpcap_usb_phy_set_host; otg 612 drivers/phy/motorola/phy-cpcap-usb.c otg->set_peripheral = cpcap_usb_phy_set_peripheral; otg 613 drivers/phy/motorola/phy-cpcap-usb.c otg->usb_phy = &ddata->phy; otg 201 drivers/phy/samsung/phy-exynos5250-usb2.c u32 otg; otg 214 drivers/phy/samsung/phy-exynos5250-usb2.c otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); otg 216 drivers/phy/samsung/phy-exynos5250-usb2.c otg &= ~EXYNOS_5250_USBOTGSYS_FSEL_MASK; otg 217 drivers/phy/samsung/phy-exynos5250-usb2.c otg |= drv->ref_reg_val << EXYNOS_5250_USBOTGSYS_FSEL_SHIFT; otg 219 drivers/phy/samsung/phy-exynos5250-usb2.c otg &= ~(EXYNOS_5250_USBOTGSYS_FORCE_SUSPEND | otg 222 drivers/phy/samsung/phy-exynos5250-usb2.c otg |= EXYNOS_5250_USBOTGSYS_PHY_SW_RST | otg 227 drivers/phy/samsung/phy-exynos5250-usb2.c otg &= ~EXYNOS_5250_USBOTGSYS_REFCLKSEL_MASK; otg 228 drivers/phy/samsung/phy-exynos5250-usb2.c otg |= EXYNOS_5250_REFCLKSEL_CLKCORE << otg 230 drivers/phy/samsung/phy-exynos5250-usb2.c writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); otg 232 drivers/phy/samsung/phy-exynos5250-usb2.c otg &= ~(EXYNOS_5250_USBOTGSYS_PHY_SW_RST | otg 236 drivers/phy/samsung/phy-exynos5250-usb2.c writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); otg 266 drivers/phy/samsung/phy-exynos5250-usb2.c otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); otg 268 drivers/phy/samsung/phy-exynos5250-usb2.c otg &= ~EXYNOS_5250_USBOTGSYS_FSEL_MASK; otg 269 drivers/phy/samsung/phy-exynos5250-usb2.c otg |= drv->ref_reg_val << EXYNOS_5250_USBOTGSYS_FSEL_SHIFT; otg 271 drivers/phy/samsung/phy-exynos5250-usb2.c otg &= ~(EXYNOS_5250_USBOTGSYS_FORCE_SUSPEND | otg 274 drivers/phy/samsung/phy-exynos5250-usb2.c otg |= EXYNOS_5250_USBOTGSYS_PHY_SW_RST | otg 279 drivers/phy/samsung/phy-exynos5250-usb2.c otg &= ~EXYNOS_5250_USBOTGSYS_REFCLKSEL_MASK; otg 280 drivers/phy/samsung/phy-exynos5250-usb2.c otg |= EXYNOS_5250_REFCLKSEL_CLKCORE << otg 282 drivers/phy/samsung/phy-exynos5250-usb2.c writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); otg 284 drivers/phy/samsung/phy-exynos5250-usb2.c otg &= ~(EXYNOS_5250_USBOTGSYS_PHY_SW_RST | otg 327 drivers/phy/samsung/phy-exynos5250-usb2.c u32 otg; otg 334 drivers/phy/samsung/phy-exynos5250-usb2.c otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); otg 335 drivers/phy/samsung/phy-exynos5250-usb2.c otg |= (EXYNOS_5250_USBOTGSYS_FORCE_SUSPEND | otg 338 drivers/phy/samsung/phy-exynos5250-usb2.c writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); otg 62 drivers/phy/ti/phy-dm816x-usb.c static int dm816x_usb_phy_set_host(struct usb_otg *otg, struct usb_bus *host) otg 64 drivers/phy/ti/phy-dm816x-usb.c otg->host = host; otg 66 drivers/phy/ti/phy-dm816x-usb.c otg->state = OTG_STATE_UNDEFINED; otg 71 drivers/phy/ti/phy-dm816x-usb.c static int dm816x_usb_phy_set_peripheral(struct usb_otg *otg, otg 74 drivers/phy/ti/phy-dm816x-usb.c otg->gadget = gadget; otg 76 drivers/phy/ti/phy-dm816x-usb.c otg->state = OTG_STATE_UNDEFINED; otg 190 drivers/phy/ti/phy-dm816x-usb.c struct usb_otg *otg; otg 225 drivers/phy/ti/phy-dm816x-usb.c otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); otg 226 drivers/phy/ti/phy-dm816x-usb.c if (!otg) otg 232 drivers/phy/ti/phy-dm816x-usb.c phy->phy.otg = otg; otg 234 drivers/phy/ti/phy-dm816x-usb.c otg->set_host = dm816x_usb_phy_set_host; otg 235 drivers/phy/ti/phy-dm816x-usb.c otg->set_peripheral = dm816x_usb_phy_set_peripheral; otg 236 drivers/phy/ti/phy-dm816x-usb.c otg->usb_phy = &phy->phy; otg 57 drivers/phy/ti/phy-omap-usb2.c static int omap_usb_set_vbus(struct usb_otg *otg, bool enabled) otg 59 drivers/phy/ti/phy-omap-usb2.c struct omap_usb *phy = phy_to_omapusb(otg->usb_phy); otg 67 drivers/phy/ti/phy-omap-usb2.c static int omap_usb_start_srp(struct usb_otg *otg) otg 69 drivers/phy/ti/phy-omap-usb2.c struct omap_usb *phy = phy_to_omapusb(otg->usb_phy); otg 77 drivers/phy/ti/phy-omap-usb2.c static int omap_usb_set_host(struct usb_otg *otg, struct usb_bus *host) otg 79 drivers/phy/ti/phy-omap-usb2.c otg->host = host; otg 81 drivers/phy/ti/phy-omap-usb2.c otg->state = OTG_STATE_UNDEFINED; otg 86 drivers/phy/ti/phy-omap-usb2.c static int omap_usb_set_peripheral(struct usb_otg *otg, otg 89 drivers/phy/ti/phy-omap-usb2.c otg->gadget = gadget; otg 91 drivers/phy/ti/phy-omap-usb2.c otg->state = OTG_STATE_UNDEFINED; otg 286 drivers/phy/ti/phy-omap-usb2.c struct usb_otg *otg; otg 304 drivers/phy/ti/phy-omap-usb2.c otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); otg 305 drivers/phy/ti/phy-omap-usb2.c if (!otg) otg 312 drivers/phy/ti/phy-omap-usb2.c phy->phy.otg = otg; otg 395 drivers/phy/ti/phy-omap-usb2.c otg->set_host = omap_usb_set_host; otg 396 drivers/phy/ti/phy-omap-usb2.c otg->set_peripheral = omap_usb_set_peripheral; otg 398 drivers/phy/ti/phy-omap-usb2.c otg->set_vbus = omap_usb_set_vbus; otg 400 drivers/phy/ti/phy-omap-usb2.c otg->start_srp = omap_usb_start_srp; otg 401 drivers/phy/ti/phy-omap-usb2.c otg->usb_phy = &phy->phy; otg 629 drivers/phy/ti/phy-twl4030-usb.c static int twl4030_set_peripheral(struct usb_otg *otg, otg 632 drivers/phy/ti/phy-twl4030-usb.c if (!otg) otg 635 drivers/phy/ti/phy-twl4030-usb.c otg->gadget = gadget; otg 637 drivers/phy/ti/phy-twl4030-usb.c otg->state = OTG_STATE_UNDEFINED; otg 642 drivers/phy/ti/phy-twl4030-usb.c static int twl4030_set_host(struct usb_otg *otg, struct usb_bus *host) otg 644 drivers/phy/ti/phy-twl4030-usb.c if (!otg) otg 647 drivers/phy/ti/phy-twl4030-usb.c otg->host = host; otg 649 drivers/phy/ti/phy-twl4030-usb.c otg->state = OTG_STATE_UNDEFINED; otg 673 drivers/phy/ti/phy-twl4030-usb.c struct usb_otg *otg; otg 691 drivers/phy/ti/phy-twl4030-usb.c otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); otg 692 drivers/phy/ti/phy-twl4030-usb.c if (!otg) otg 703 drivers/phy/ti/phy-twl4030-usb.c twl->phy.otg = otg; otg 706 drivers/phy/ti/phy-twl4030-usb.c otg->usb_phy = &twl->phy; otg 707 drivers/phy/ti/phy-twl4030-usb.c otg->set_host = twl4030_set_host; otg 708 drivers/phy/ti/phy-twl4030-usb.c otg->set_peripheral = twl4030_set_peripheral; otg 839 drivers/pinctrl/tegra/pinctrl-tegra-xusb.c TEGRA124_LANE("otg-0", 0x004, 0, 0x3, 0, otg), otg 840 drivers/pinctrl/tegra/pinctrl-tegra-xusb.c TEGRA124_LANE("otg-1", 0x004, 2, 0x3, 0, otg), otg 841 drivers/pinctrl/tegra/pinctrl-tegra-xusb.c TEGRA124_LANE("otg-2", 0x004, 4, 0x3, 0, otg), otg 128 drivers/power/supply/axp288_charger.c } otg; otg 402 drivers/power/supply/axp288_charger.c if (info->otg.id_short) { otg 413 drivers/power/supply/axp288_charger.c if (info->otg.id_short) { otg 656 drivers/power/supply/axp288_charger.c container_of(work, struct axp288_chrg_info, otg.work); otg 657 drivers/power/supply/axp288_charger.c struct extcon_dev *edev = info->otg.cable; otg 667 drivers/power/supply/axp288_charger.c info->otg.id_short = usb_host; otg 670 drivers/power/supply/axp288_charger.c ret = axp288_charger_vbus_path_select(info, !info->otg.id_short); otg 679 drivers/power/supply/axp288_charger.c container_of(nb, struct axp288_chrg_info, otg.id_nb); otg 681 drivers/power/supply/axp288_charger.c schedule_work(&info->otg.work); otg 787 drivers/power/supply/axp288_charger.c cancel_work_sync(&info->otg.work); otg 826 drivers/power/supply/axp288_charger.c info->otg.cable = extcon_get_extcon_dev(USB_HOST_EXTCON_NAME); otg 827 drivers/power/supply/axp288_charger.c if (info->otg.cable == NULL) { otg 868 drivers/power/supply/axp288_charger.c INIT_WORK(&info->otg.work, axp288_charger_otg_evt_worker); otg 869 drivers/power/supply/axp288_charger.c info->otg.id_nb.notifier_call = axp288_charger_handle_otg_evt; otg 870 drivers/power/supply/axp288_charger.c if (info->otg.cable) { otg 871 drivers/power/supply/axp288_charger.c ret = devm_extcon_register_notifier(&pdev->dev, info->otg.cable, otg 872 drivers/power/supply/axp288_charger.c EXTCON_USB_HOST, &info->otg.id_nb); otg 877 drivers/power/supply/axp288_charger.c schedule_work(&info->otg.work); otg 249 drivers/power/supply/isp1704_charger.c if (isp->phy->otg->gadget) otg 250 drivers/power/supply/isp1704_charger.c usb_gadget_connect(isp->phy->otg->gadget); otg 279 drivers/power/supply/isp1704_charger.c if (isp->phy->otg->gadget) otg 280 drivers/power/supply/isp1704_charger.c usb_gadget_disconnect(isp->phy->otg->gadget); otg 458 drivers/power/supply/isp1704_charger.c if (isp->phy->otg->gadget) otg 459 drivers/power/supply/isp1704_charger.c usb_gadget_disconnect(isp->phy->otg->gadget); otg 466 drivers/power/supply/isp1704_charger.c !isp->phy->otg->default_a) otg 215 drivers/usb/chipidea/ci.h struct usb_otg otg; otg 1228 drivers/usb/chipidea/core.c if ((ci->fsm.otg->state == OTG_STATE_A_IDLE) && otg 1240 drivers/usb/chipidea/core.c if ((ci->fsm.otg->state == OTG_STATE_A_IDLE) && otg 199 drivers/usb/chipidea/debug.c usb_otg_state_string(ci->otg.state)); otg 167 drivers/usb/chipidea/host.c struct usb_otg *otg = &ci->otg; otg 172 drivers/usb/chipidea/host.c otg->host = &hcd->self; otg 211 drivers/usb/chipidea/host.c ci->otg.host = NULL; otg 66 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) { otg 150 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.otg->state == OTG_STATE_B_PERIPHERAL) { otg 353 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.otg->state == OTG_STATE_B_IDLE) otg 514 drivers/usb/chipidea/otg_fsm.c if (!fsm->otg->host) otg 517 drivers/usb/chipidea/otg_fsm.c udev = usb_hub_find_child(fsm->otg->host->root_hub, 1); otg 588 drivers/usb/chipidea/otg_fsm.c ci->fsm.otg->state < OTG_STATE_A_IDLE) otg 593 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.otg->state == OTG_STATE_A_IDLE) { otg 614 drivers/usb/chipidea/otg_fsm.c } else if (ci->fsm.otg->state == OTG_STATE_B_IDLE) { otg 623 drivers/usb/chipidea/otg_fsm.c } else if (ci->fsm.otg->state == OTG_STATE_A_HOST) { otg 646 drivers/usb/chipidea/otg_fsm.c switch (ci->fsm.otg->state) { otg 794 drivers/usb/chipidea/otg_fsm.c ci->otg.phy = ci->phy; otg 796 drivers/usb/chipidea/otg_fsm.c ci->otg.usb_phy = ci->usb_phy; otg 798 drivers/usb/chipidea/otg_fsm.c ci->otg.gadget = &ci->gadget; otg 799 drivers/usb/chipidea/otg_fsm.c ci->fsm.otg = &ci->otg; otg 802 drivers/usb/chipidea/otg_fsm.c ci->fsm.otg->state = OTG_STATE_UNDEFINED; otg 1810 drivers/usb/chipidea/udc.c if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) { otg 1813 drivers/usb/chipidea/udc.c } else if (ci->fsm.otg->state == OTG_STATE_B_PERIPHERAL) { otg 1815 drivers/usb/chipidea/udc.c ci->fsm.otg->state = OTG_STATE_UNDEFINED; otg 74 drivers/usb/common/usb-otg-fsm.c if (fsm->otg->gadget) otg 75 drivers/usb/common/usb-otg-fsm.c fsm->otg->gadget->host_request_flag = 0; otg 105 drivers/usb/common/usb-otg-fsm.c if (fsm->otg->gadget) otg 106 drivers/usb/common/usb-otg-fsm.c fsm->otg->gadget->host_request_flag = 0; otg 125 drivers/usb/common/usb-otg-fsm.c enum usb_otg_state state = fsm->otg->state; otg 132 drivers/usb/common/usb-otg-fsm.c udev = usb_hub_find_child(fsm->otg->host->root_hub, 1); otg 134 drivers/usb/common/usb-otg-fsm.c dev_err(fsm->otg->host->controller, otg 169 drivers/usb/common/usb-otg-fsm.c if (!fsm->otg->host->b_hnp_enable) { otg 177 drivers/usb/common/usb-otg-fsm.c fsm->otg->host->b_hnp_enable = 1; otg 204 drivers/usb/common/usb-otg-fsm.c if (fsm->otg->state == new_state) otg 207 drivers/usb/common/usb-otg-fsm.c otg_leave_state(fsm, fsm->otg->state); otg 247 drivers/usb/common/usb-otg-fsm.c usb_bus_start_enum(fsm->otg->host, otg 248 drivers/usb/common/usb-otg-fsm.c fsm->otg->host->otg_port); otg 318 drivers/usb/common/usb-otg-fsm.c fsm->otg->state = new_state; otg 330 drivers/usb/common/usb-otg-fsm.c state = fsm->otg->state; otg 345 drivers/usb/common/usb-otg-fsm.c else if (fsm->b_sess_vld && fsm->otg->gadget) otg 358 drivers/usb/common/usb-otg-fsm.c else if (fsm->b_bus_req && fsm->otg-> otg 404 drivers/usb/common/usb-otg-fsm.c fsm->otg->host->b_hnp_enable) otg 412 drivers/usb/common/usb-otg-fsm.c if (!fsm->b_conn && fsm->otg->host->b_hnp_enable) otg 414 drivers/usb/common/usb-otg-fsm.c else if (!fsm->b_conn && !fsm->otg->host->b_hnp_enable) otg 4446 drivers/usb/dwc2/gadget.c otg_set_peripheral(hsotg->uphy->otg, &hsotg->gadget); otg 4499 drivers/usb/dwc2/gadget.c otg_set_peripheral(hsotg->uphy->otg, NULL); otg 5223 drivers/usb/dwc2/hcd.c otg_set_host(hsotg->uphy->otg, &hcd->self); otg 5281 drivers/usb/dwc2/hcd.c otg_set_host(hsotg->uphy->otg, NULL); otg 168 drivers/usb/dwc3/core.c otg_set_vbus(dwc->usb2_phy->otg, true); otg 177 drivers/usb/dwc3/core.c otg_set_vbus(dwc->usb2_phy->otg, false); otg 1156 drivers/usb/dwc3/core.c otg_set_vbus(dwc->usb2_phy->otg, false); otg 1171 drivers/usb/dwc3/core.c otg_set_vbus(dwc->usb2_phy->otg, true); otg 388 drivers/usb/dwc3/drd.c otg_set_vbus(dwc->usb2_phy->otg, true); otg 402 drivers/usb/dwc3/drd.c otg_set_vbus(dwc->usb2_phy->otg, false); otg 1963 drivers/usb/gadget/udc/fsl_udc_core.c udc_controller->transceiver->otg, otg 1989 drivers/usb/gadget/udc/fsl_udc_core.c otg_set_peripheral(udc_controller->transceiver->otg, NULL); otg 1371 drivers/usb/gadget/udc/mv_udc_core.c retval = otg_set_peripheral(udc->transceiver->otg, otg 1156 drivers/usb/gadget/udc/omap_udc.c retval = otg_start_srp(udc->transceiver->otg); otg 2075 drivers/usb/gadget/udc/omap_udc.c status = otg_set_peripheral(udc->transceiver->otg, otg 2114 drivers/usb/gadget/udc/omap_udc.c (void) otg_set_peripheral(udc->transceiver->otg, NULL); otg 2788 drivers/usb/gadget/udc/omap_udc.c config->otg ? ", Mini-AB" : ""); otg 2818 drivers/usb/gadget/udc/omap_udc.c else if (config->otg) { otg 2875 drivers/usb/gadget/udc/omap_udc.c udc->gadget.is_otg = (config->otg != 0); otg 1478 drivers/usb/gadget/udc/pxa25x_udc.c retval = otg_set_peripheral(dev->transceiver->otg, otg 1554 drivers/usb/gadget/udc/pxa25x_udc.c (void) otg_set_peripheral(dev->transceiver->otg, NULL); otg 1758 drivers/usb/gadget/udc/pxa27x_udc.c retval = otg_set_peripheral(udc->transceiver->otg, otg 1809 drivers/usb/gadget/udc/pxa27x_udc.c return otg_set_peripheral(udc->transceiver->otg, NULL); otg 1177 drivers/usb/gadget/udc/s3c-hsudc.c ret = otg_set_peripheral(hsudc->transceiver->otg, otg 1223 drivers/usb/gadget/udc/s3c-hsudc.c (void) otg_set_peripheral(hsudc->transceiver->otg, NULL); otg 160 drivers/usb/host/ehci-fsl.c retval = otg_set_host(hcd->usb_phy->otg, otg 699 drivers/usb/host/ehci-fsl.c otg_set_host(hcd->usb_phy->otg, NULL); otg 942 drivers/usb/host/ehci-hub.c otg_start_hnp(hcd->usb_phy->otg); otg 36 drivers/usb/host/ehci-mv.c struct usb_phy *otg; otg 170 drivers/usb/host/ehci-mv.c ehci_mv->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); otg 171 drivers/usb/host/ehci-mv.c if (IS_ERR(ehci_mv->otg)) { otg 172 drivers/usb/host/ehci-mv.c retval = PTR_ERR(ehci_mv->otg); otg 183 drivers/usb/host/ehci-mv.c retval = otg_set_host(ehci_mv->otg->otg, &hcd->self); otg 231 drivers/usb/host/ehci-mv.c if (!IS_ERR_OR_NULL(ehci_mv->otg)) otg 232 drivers/usb/host/ehci-mv.c otg_set_host(ehci_mv->otg->otg, NULL); otg 117 drivers/usb/host/ehci-mxc.c if (pdata->otg) { otg 118 drivers/usb/host/ehci-mxc.c pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET; otg 119 drivers/usb/host/ehci-mxc.c ret = usb_phy_init(pdata->otg); otg 125 drivers/usb/host/ehci-mxc.c ret = otg_set_vbus(pdata->otg->otg, 1); otg 168 drivers/usb/host/ehci-mxc.c if (pdata && pdata->otg) otg 169 drivers/usb/host/ehci-mxc.c usb_phy_shutdown(pdata->otg); otg 475 drivers/usb/host/ehci-tegra.c u_phy->otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg), otg 477 drivers/usb/host/ehci-tegra.c if (!u_phy->otg) { otg 481 drivers/usb/host/ehci-tegra.c u_phy->otg->host = hcd_to_bus(hcd); otg 496 drivers/usb/host/ehci-tegra.c otg_set_host(u_phy->otg, &hcd->self); otg 508 drivers/usb/host/ehci-tegra.c otg_set_host(u_phy->otg, NULL); otg 524 drivers/usb/host/ehci-tegra.c otg_set_host(hcd->usb_phy->otg, NULL); otg 180 drivers/usb/host/ohci-omap.c otg_start_hnp(hcd->usb_phy->otg); otg 183 drivers/usb/host/ohci-omap.c hcd->usb_phy->otg->state = OTG_STATE_A_SUSPEND; otg 199 drivers/usb/host/ohci-omap.c int need_transceiver = (config->otg != 0); otg 204 drivers/usb/host/ohci-omap.c if (config->otg) { otg 205 drivers/usb/host/ohci-omap.c hcd->self.otg_port = config->otg; otg 222 drivers/usb/host/ohci-omap.c int status = otg_set_host(hcd->usb_phy->otg, otg 249 drivers/usb/host/ohci-omap.c if (config->otg || config->rwc) { otg 401 drivers/usb/host/ohci-omap.c (void) otg_set_host(hcd->usb_phy->otg, 0); otg 4124 drivers/usb/host/oxu210hp-hcd.c void *base, int irq, int otg) otg 4133 drivers/usb/host/oxu210hp-hcd.c oxu_writel(base + (otg ? OXU_OTG_CORE_OFFSET : OXU_SPH_CORE_OFFSET), otg 4138 drivers/usb/host/oxu210hp-hcd.c otg ? "oxu210hp_otg" : "oxu210hp_sph"); otg 4149 drivers/usb/host/oxu210hp-hcd.c oxu->is_otg = otg; otg 133 drivers/usb/musb/am35x.c usb_otg_state_string(musb->xceiv->otg->state)); otg 136 drivers/usb/musb/am35x.c switch (musb->xceiv->otg->state) { otg 143 drivers/usb/musb/am35x.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 146 drivers/usb/musb/am35x.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 151 drivers/usb/musb/am35x.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 160 drivers/usb/musb/am35x.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 177 drivers/usb/musb/am35x.c musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON)) { otg 179 drivers/usb/musb/am35x.c usb_otg_state_string(musb->xceiv->otg->state)); otg 192 drivers/usb/musb/am35x.c usb_otg_state_string(musb->xceiv->otg->state), otg 261 drivers/usb/musb/am35x.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; otg 266 drivers/usb/musb/am35x.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 272 drivers/usb/musb/am35x.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 279 drivers/usb/musb/am35x.c usb_otg_state_string(musb->xceiv->otg->state), otg 305 drivers/usb/musb/am35x.c if (musb->xceiv->otg->state == OTG_STATE_B_IDLE) otg 135 drivers/usb/musb/da8xx.c usb_otg_state_string(musb->xceiv->otg->state)); otg 138 drivers/usb/musb/da8xx.c switch (musb->xceiv->otg->state) { otg 145 drivers/usb/musb/da8xx.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 148 drivers/usb/musb/da8xx.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 163 drivers/usb/musb/da8xx.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 185 drivers/usb/musb/da8xx.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 202 drivers/usb/musb/da8xx.c musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON)) { otg 204 drivers/usb/musb/da8xx.c usb_otg_state_string(musb->xceiv->otg->state)); otg 217 drivers/usb/musb/da8xx.c usb_otg_state_string(musb->xceiv->otg->state), otg 277 drivers/usb/musb/da8xx.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; otg 282 drivers/usb/musb/da8xx.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 296 drivers/usb/musb/da8xx.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 302 drivers/usb/musb/da8xx.c usb_otg_state_string(musb->xceiv->otg->state), otg 317 drivers/usb/musb/da8xx.c if (musb->xceiv->otg->state == OTG_STATE_B_IDLE) otg 198 drivers/usb/musb/davinci.c usb_otg_state_string(musb->xceiv->otg->state)); otg 201 drivers/usb/musb/davinci.c switch (musb->xceiv->otg->state) { otg 212 drivers/usb/musb/davinci.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 235 drivers/usb/musb/davinci.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 248 drivers/usb/musb/davinci.c struct usb_otg *otg = musb->xceiv->otg; otg 309 drivers/usb/musb/davinci.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; otg 314 drivers/usb/musb/davinci.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 320 drivers/usb/musb/davinci.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 330 drivers/usb/musb/davinci.c usb_otg_state_string(musb->xceiv->otg->state), otg 343 drivers/usb/musb/davinci.c if (musb->xceiv->otg->state == OTG_STATE_B_IDLE) otg 460 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 465 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 471 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 473 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; otg 477 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 492 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 494 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 498 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 504 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 513 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 529 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 532 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 540 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_A_HOST; otg 547 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 554 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 557 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 560 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_A_HOST; otg 583 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 600 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 611 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 638 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 667 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state), otg 692 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state), devctl); otg 694 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 719 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_WAIT_ACON; otg 732 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_A_SUSPEND; otg 770 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 782 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_HOST; otg 790 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_A_HOST; otg 800 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state), devctl); otg 806 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state), otg 809 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 827 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 843 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 867 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 868 drivers/usb/musb/musb_core.c switch (musb->xceiv->otg->state) { otg 875 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state), otg 886 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 887 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 891 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 898 drivers/usb/musb/musb_core.c usb_otg_state_string(musb->xceiv->otg->state)); otg 1080 drivers/usb/musb/musb_core.c musb->xceiv->otg->state != OTG_STATE_A_WAIT_BCON && otg 1727 drivers/usb/musb/musb_core.c ret = sprintf(buf, "%s\n", usb_otg_state_string(musb->xceiv->otg->state)); otg 1772 drivers/usb/musb/musb_core.c if (musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON) otg 1940 drivers/usb/musb/musb_core.c if (musb->xceiv->otg->state != musb->xceiv_old_state) { otg 1941 drivers/usb/musb/musb_core.c musb->xceiv_old_state = musb->xceiv->otg->state; otg 2361 drivers/usb/musb/musb_core.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 238 drivers/usb/musb/musb_debugfs.c switch (musb->xceiv->otg->state) { otg 278 drivers/usb/musb/musb_debugfs.c switch (musb->xceiv->otg->state) { otg 289 drivers/usb/musb/musb_debugfs.c switch (musb->xceiv->otg->state) { otg 187 drivers/usb/musb/musb_dsps.c if (musb->xceiv->otg->state == OTG_STATE_B_IDLE) otg 226 drivers/usb/musb/musb_dsps.c usb_otg_state_string(musb->xceiv->otg->state)); otg 228 drivers/usb/musb/musb_dsps.c switch (musb->xceiv->otg->state) { otg 231 drivers/usb/musb/musb_dsps.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; otg 251 drivers/usb/musb/musb_dsps.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 254 drivers/usb/musb/musb_dsps.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 268 drivers/usb/musb/musb_dsps.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 367 drivers/usb/musb/musb_dsps.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; otg 372 drivers/usb/musb/musb_dsps.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 377 drivers/usb/musb/musb_dsps.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 383 drivers/usb/musb/musb_dsps.c usb_otg_state_string(musb->xceiv->otg->state), otg 393 drivers/usb/musb/musb_dsps.c switch (musb->xceiv->otg->state) { otg 1021 drivers/usb/musb/musb_dsps.c if (musb->xceiv->otg->state == OTG_STATE_B_IDLE && otg 1522 drivers/usb/musb/musb_gadget.c switch (musb->xceiv->otg->state) { otg 1552 drivers/usb/musb/musb_gadget.c otg_start_srp(musb->xceiv->otg); otg 1563 drivers/usb/musb/musb_gadget.c usb_otg_state_string(musb->xceiv->otg->state)); otg 1786 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 1833 drivers/usb/musb/musb_gadget.c struct usb_otg *otg = musb->xceiv->otg; otg 1850 drivers/usb/musb/musb_gadget.c otg_set_peripheral(otg, &musb->g); otg 1851 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 1896 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_UNDEFINED; otg 1898 drivers/usb/musb/musb_gadget.c otg_set_peripheral(musb->xceiv->otg, NULL); otg 1927 drivers/usb/musb/musb_gadget.c switch (musb->xceiv->otg->state) { otg 1941 drivers/usb/musb/musb_gadget.c usb_otg_state_string(musb->xceiv->otg->state)); otg 1953 drivers/usb/musb/musb_gadget.c switch (musb->xceiv->otg->state) { otg 1956 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 1971 drivers/usb/musb/musb_gadget.c usb_otg_state_string(musb->xceiv->otg->state)); otg 2002 drivers/usb/musb/musb_gadget.c switch (musb->xceiv->otg->state) { otg 2005 drivers/usb/musb/musb_gadget.c usb_otg_state_string(musb->xceiv->otg->state)); otg 2006 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 2010 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; otg 2017 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 2081 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 2084 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; otg 2087 drivers/usb/musb/musb_gadget.c musb->xceiv->otg->state = OTG_STATE_A_PERIPHERAL; otg 2530 drivers/usb/musb/musb_host.c switch (musb->xceiv->otg->state) { otg 2540 drivers/usb/musb/musb_host.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; otg 2548 drivers/usb/musb/musb_host.c usb_otg_state_string(musb->xceiv->otg->state)); otg 2749 drivers/usb/musb/musb_host.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 2751 drivers/usb/musb/musb_host.c otg_set_host(musb->xceiv->otg, &hcd->self); otg 2754 drivers/usb/musb/musb_host.c musb->xceiv->otg->host = &hcd->self; otg 46 drivers/usb/musb/musb_virthub.c musb->xceiv->otg->state = OTG_STATE_A_HOST; otg 53 drivers/usb/musb/musb_virthub.c struct usb_otg *otg = musb->xceiv->otg; otg 88 drivers/usb/musb/musb_virthub.c switch (musb->xceiv->otg->state) { otg 90 drivers/usb/musb/musb_virthub.c musb->xceiv->otg->state = OTG_STATE_A_SUSPEND; otg 91 drivers/usb/musb/musb_virthub.c musb->is_active = otg->host->b_hnp_enable; otg 99 drivers/usb/musb/musb_virthub.c musb->xceiv->otg->state = OTG_STATE_B_WAIT_ACON; otg 100 drivers/usb/musb/musb_virthub.c musb->is_active = otg->host->b_hnp_enable; otg 105 drivers/usb/musb/musb_virthub.c usb_otg_state_string(musb->xceiv->otg->state)); otg 126 drivers/usb/musb/musb_virthub.c if (musb->xceiv->otg->state == OTG_STATE_B_IDLE) { otg 199 drivers/usb/musb/musb_virthub.c struct usb_otg *otg = musb->xceiv->otg; otg 207 drivers/usb/musb/musb_virthub.c switch (musb->xceiv->otg->state) { otg 209 drivers/usb/musb/musb_virthub.c if (otg->host->b_hnp_enable) { otg 210 drivers/usb/musb/musb_virthub.c musb->xceiv->otg->state = OTG_STATE_A_PERIPHERAL; otg 216 drivers/usb/musb/musb_virthub.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; otg 220 drivers/usb/musb/musb_virthub.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 224 drivers/usb/musb/musb_virthub.c usb_otg_state_string(musb->xceiv->otg->state)); otg 43 drivers/usb/musb/omap2430.c struct usb_otg *otg = musb->xceiv->otg; otg 54 drivers/usb/musb/omap2430.c if (musb->xceiv->otg->state == OTG_STATE_A_IDLE) { otg 77 drivers/usb/musb/omap2430.c otg_set_vbus(otg, 1); otg 80 drivers/usb/musb/omap2430.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 91 drivers/usb/musb/omap2430.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 100 drivers/usb/musb/omap2430.c usb_otg_state_string(musb->xceiv->otg->state), otg 155 drivers/usb/musb/omap2430.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 167 drivers/usb/musb/omap2430.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 181 drivers/usb/musb/omap2430.c otg_set_vbus(musb->xceiv->otg, 0); otg 108 drivers/usb/musb/sunxi.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 113 drivers/usb/musb/sunxi.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 145 drivers/usb/musb/sunxi.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 340 drivers/usb/musb/tusb6010.c if (x->otg->default_a || mA < (musb->min_power << 1)) otg 459 drivers/usb/musb/tusb6010.c switch (musb->xceiv->otg->state) { otg 465 drivers/usb/musb/tusb6010.c usb_otg_state_string(musb->xceiv->otg->state)); otg 518 drivers/usb/musb/tusb6010.c && (musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON))) { otg 520 drivers/usb/musb/tusb6010.c usb_otg_state_string(musb->xceiv->otg->state)); otg 537 drivers/usb/musb/tusb6010.c usb_otg_state_string(musb->xceiv->otg->state), otg 554 drivers/usb/musb/tusb6010.c struct usb_otg *otg = musb->xceiv->otg; otg 567 drivers/usb/musb/tusb6010.c otg->default_a = 1; otg 568 drivers/usb/musb/tusb6010.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 581 drivers/usb/musb/tusb6010.c switch (musb->xceiv->otg->state) { otg 584 drivers/usb/musb/tusb6010.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; otg 587 drivers/usb/musb/tusb6010.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 590 drivers/usb/musb/tusb6010.c musb->xceiv->otg->state = OTG_STATE_A_IDLE; otg 593 drivers/usb/musb/tusb6010.c otg->default_a = 1; otg 597 drivers/usb/musb/tusb6010.c otg->default_a = 0; otg 598 drivers/usb/musb/tusb6010.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 613 drivers/usb/musb/tusb6010.c usb_otg_state_string(musb->xceiv->otg->state), otg 680 drivers/usb/musb/tusb6010.c struct usb_otg *otg = musb->xceiv->otg; otg 688 drivers/usb/musb/tusb6010.c otg->default_a = default_a; otg 700 drivers/usb/musb/tusb6010.c if (!otg->default_a) { otg 712 drivers/usb/musb/tusb6010.c if (musb->xceiv->otg->state != OTG_STATE_B_IDLE) { otg 714 drivers/usb/musb/tusb6010.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 720 drivers/usb/musb/tusb6010.c usb_otg_state_string(musb->xceiv->otg->state), otg_stat); otg 726 drivers/usb/musb/tusb6010.c usb_otg_state_string(musb->xceiv->otg->state), otg_stat); otg 728 drivers/usb/musb/tusb6010.c switch (musb->xceiv->otg->state) { otg 775 drivers/usb/musb/tusb6010.c usb_otg_state_string(musb->xceiv->otg->state), otg_stat); otg 777 drivers/usb/musb/tusb6010.c switch (musb->xceiv->otg->state) { otg 789 drivers/usb/musb/tusb6010.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; otg 46 drivers/usb/musb/ux500.c if (musb->xceiv->otg->state == OTG_STATE_A_IDLE) { otg 65 drivers/usb/musb/ux500.c musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; otg 90 drivers/usb/musb/ux500.c usb_otg_state_string(musb->xceiv->otg->state), otg 100 drivers/usb/musb/ux500.c event, usb_otg_state_string(musb->xceiv->otg->state)); otg 115 drivers/usb/musb/ux500.c musb->xceiv->otg->state = OTG_STATE_B_IDLE; otg 340 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->default_a = false; otg 348 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->state = OTG_STATE_B_IDLE; otg 381 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->default_a = true; otg 432 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->default_a = false; otg 437 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->state = OTG_STATE_B_IDLE; otg 473 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->default_a = true; otg 550 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->default_a = false; otg 565 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->default_a = false; otg 596 drivers/usb/phy/phy-ab8500-usb.c if (!ab->phy.otg->host) otg 599 drivers/usb/phy/phy-ab8500-usb.c if (!ab->phy.otg->gadget) otg 609 drivers/usb/phy/phy-ab8500-usb.c static int ab8500_usb_set_peripheral(struct usb_otg *otg, otg 614 drivers/usb/phy/phy-ab8500-usb.c if (!otg) otg 617 drivers/usb/phy/phy-ab8500-usb.c ab = phy_to_ab(otg->usb_phy); otg 619 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->gadget = gadget; otg 634 drivers/usb/phy/phy-ab8500-usb.c static int ab8500_usb_set_host(struct usb_otg *otg, struct usb_bus *host) otg 638 drivers/usb/phy/phy-ab8500-usb.c if (!otg) otg 641 drivers/usb/phy/phy-ab8500-usb.c ab = phy_to_ab(otg->usb_phy); otg 643 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->host = host; otg 848 drivers/usb/phy/phy-ab8500-usb.c struct usb_otg *otg; otg 864 drivers/usb/phy/phy-ab8500-usb.c otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); otg 865 drivers/usb/phy/phy-ab8500-usb.c if (!otg) otg 871 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg = otg; otg 874 drivers/usb/phy/phy-ab8500-usb.c ab->phy.otg->state = OTG_STATE_UNDEFINED; otg 876 drivers/usb/phy/phy-ab8500-usb.c otg->usb_phy = &ab->phy; otg 877 drivers/usb/phy/phy-ab8500-usb.c otg->set_host = ab8500_usb_set_host; otg 878 drivers/usb/phy/phy-ab8500-usb.c otg->set_peripheral = ab8500_usb_set_peripheral; otg 258 drivers/usb/phy/phy-fsl-usb.c if ((fsl_otg_dev->phy.otg->state == OTG_STATE_B_SRP_INIT) && otg 271 drivers/usb/phy/phy-fsl-usb.c if (!fsl_otg_dev->phy.otg->host->b_hnp_enable) otg 459 drivers/usb/phy/phy-fsl-usb.c struct usb_otg *otg = fsm->otg; otg 462 drivers/usb/phy/phy-fsl-usb.c container_of(otg->usb_phy, struct fsl_otg, phy); otg 465 drivers/usb/phy/phy-fsl-usb.c if (!otg->host) otg 467 drivers/usb/phy/phy-fsl-usb.c dev = otg->host->controller; otg 526 drivers/usb/phy/phy-fsl-usb.c struct usb_otg *otg = fsm->otg; otg 529 drivers/usb/phy/phy-fsl-usb.c if (!otg->gadget || !otg->gadget->dev.parent) otg 533 drivers/usb/phy/phy-fsl-usb.c dev = otg->gadget->dev.parent; otg 550 drivers/usb/phy/phy-fsl-usb.c static int fsl_otg_set_host(struct usb_otg *otg, struct usb_bus *host) otg 554 drivers/usb/phy/phy-fsl-usb.c if (!otg) otg 557 drivers/usb/phy/phy-fsl-usb.c otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); otg 561 drivers/usb/phy/phy-fsl-usb.c otg->host = host; otg 569 drivers/usb/phy/phy-fsl-usb.c otg->host->otg_port = fsl_otg_initdata.otg_port; otg 570 drivers/usb/phy/phy-fsl-usb.c otg->host->is_b_host = otg_dev->fsm.id; otg 586 drivers/usb/phy/phy-fsl-usb.c otg->state = OTG_STATE_UNDEFINED; otg 599 drivers/usb/phy/phy-fsl-usb.c static int fsl_otg_set_peripheral(struct usb_otg *otg, otg 604 drivers/usb/phy/phy-fsl-usb.c if (!otg) otg 607 drivers/usb/phy/phy-fsl-usb.c otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); otg 614 drivers/usb/phy/phy-fsl-usb.c if (!otg->default_a) otg 615 drivers/usb/phy/phy-fsl-usb.c otg->gadget->ops->vbus_draw(otg->gadget, 0); otg 616 drivers/usb/phy/phy-fsl-usb.c usb_gadget_vbus_disconnect(otg->gadget); otg 617 drivers/usb/phy/phy-fsl-usb.c otg->gadget = 0; otg 623 drivers/usb/phy/phy-fsl-usb.c otg->gadget = gadget; otg 624 drivers/usb/phy/phy-fsl-usb.c otg->gadget->is_a_peripheral = !otg_dev->fsm.id; otg 662 drivers/usb/phy/phy-fsl-usb.c static int fsl_otg_start_srp(struct usb_otg *otg) otg 666 drivers/usb/phy/phy-fsl-usb.c if (!otg || otg->state != OTG_STATE_B_IDLE) otg 669 drivers/usb/phy/phy-fsl-usb.c otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); otg 680 drivers/usb/phy/phy-fsl-usb.c static int fsl_otg_start_hnp(struct usb_otg *otg) otg 684 drivers/usb/phy/phy-fsl-usb.c if (!otg) otg 687 drivers/usb/phy/phy-fsl-usb.c otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); otg 709 drivers/usb/phy/phy-fsl-usb.c struct usb_otg *otg = ((struct fsl_otg *)dev_id)->phy.otg; otg 720 drivers/usb/phy/phy-fsl-usb.c otg->default_a = (fsm->id == 0); otg 726 drivers/usb/phy/phy-fsl-usb.c otg->default_a = (fsm->id == 0); otg 733 drivers/usb/phy/phy-fsl-usb.c if (otg->host) otg 734 drivers/usb/phy/phy-fsl-usb.c otg->host->is_b_host = fsm->id; otg 735 drivers/usb/phy/phy-fsl-usb.c if (otg->gadget) otg 736 drivers/usb/phy/phy-fsl-usb.c otg->gadget->is_a_peripheral = !fsm->id; otg 785 drivers/usb/phy/phy-fsl-usb.c fsl_otg_tc->phy.otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); otg 786 drivers/usb/phy/phy-fsl-usb.c if (!fsl_otg_tc->phy.otg) { otg 808 drivers/usb/phy/phy-fsl-usb.c fsl_otg_tc->phy.otg->usb_phy = &fsl_otg_tc->phy; otg 809 drivers/usb/phy/phy-fsl-usb.c fsl_otg_tc->phy.otg->set_host = fsl_otg_set_host; otg 810 drivers/usb/phy/phy-fsl-usb.c fsl_otg_tc->phy.otg->set_peripheral = fsl_otg_set_peripheral; otg 811 drivers/usb/phy/phy-fsl-usb.c fsl_otg_tc->phy.otg->start_hnp = fsl_otg_start_hnp; otg 812 drivers/usb/phy/phy-fsl-usb.c fsl_otg_tc->phy.otg->start_srp = fsl_otg_start_srp; otg 826 drivers/usb/phy/phy-fsl-usb.c kfree(fsl_otg_tc->phy.otg); otg 847 drivers/usb/phy/phy-fsl-usb.c fsm->otg = p_otg->phy.otg; otg 882 drivers/usb/phy/phy-fsl-usb.c kfree(p_otg->phy.otg); otg 942 drivers/usb/phy/phy-fsl-usb.c p_otg->phy.otg->state = OTG_STATE_UNDEFINED; otg 945 drivers/usb/phy/phy-fsl-usb.c p_otg->phy.otg->state = OTG_STATE_A_IDLE; otg 1000 drivers/usb/phy/phy-fsl-usb.c usb_otg_state_string(fsl_otg_dev->phy.otg->state)); otg 1153 drivers/usb/phy/phy-fsl-usb.c kfree(fsl_otg_dev->phy.otg); otg 287 drivers/usb/phy/phy-fsl-usb.h #define SET_OTG_STATE(phy, newstate) ((phy)->otg->state = newstate) otg 105 drivers/usb/phy/phy-generic.c struct usb_otg *otg = nop->phy.otg; otg 115 drivers/usb/phy/phy-generic.c otg->state = OTG_STATE_B_PERIPHERAL; otg 122 drivers/usb/phy/phy-generic.c otg->gadget); otg 127 drivers/usb/phy/phy-generic.c otg->state = OTG_STATE_B_IDLE; otg 131 drivers/usb/phy/phy-generic.c otg->gadget); otg 174 drivers/usb/phy/phy-generic.c static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) otg 176 drivers/usb/phy/phy-generic.c if (!otg) otg 180 drivers/usb/phy/phy-generic.c otg->gadget = NULL; otg 184 drivers/usb/phy/phy-generic.c otg->gadget = gadget; otg 185 drivers/usb/phy/phy-generic.c if (otg->state == OTG_STATE_B_PERIPHERAL) otg 186 drivers/usb/phy/phy-generic.c atomic_notifier_call_chain(&otg->usb_phy->notifier, otg 187 drivers/usb/phy/phy-generic.c USB_EVENT_VBUS, otg->gadget); otg 189 drivers/usb/phy/phy-generic.c otg->state = OTG_STATE_B_IDLE; otg 193 drivers/usb/phy/phy-generic.c static int nop_set_host(struct usb_otg *otg, struct usb_bus *host) otg 195 drivers/usb/phy/phy-generic.c if (!otg) otg 199 drivers/usb/phy/phy-generic.c otg->host = NULL; otg 203 drivers/usb/phy/phy-generic.c otg->host = host; otg 257 drivers/usb/phy/phy-generic.c nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg), otg 259 drivers/usb/phy/phy-generic.c if (!nop->phy.otg) otg 292 drivers/usb/phy/phy-generic.c nop->phy.otg->state = OTG_STATE_UNDEFINED; otg 293 drivers/usb/phy/phy-generic.c nop->phy.otg->usb_phy = &nop->phy; otg 294 drivers/usb/phy/phy-generic.c nop->phy.otg->set_host = nop_set_host; otg 295 drivers/usb/phy/phy-generic.c nop->phy.otg->set_peripheral = nop_set_peripheral; otg 325 drivers/usb/phy/phy-generic.c nop->phy.otg->state = gpiod_get_value(nop->gpiod_vbus) ? otg 104 drivers/usb/phy/phy-gpio-vbus-usb.c if (!gpio_vbus->phy.otg->gadget) otg 121 drivers/usb/phy/phy-gpio-vbus-usb.c gpio_vbus->phy.otg->state = OTG_STATE_B_PERIPHERAL; otg 123 drivers/usb/phy/phy-gpio-vbus-usb.c usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); otg 133 drivers/usb/phy/phy-gpio-vbus-usb.c status, gpio_vbus->phy.otg->gadget); otg 142 drivers/usb/phy/phy-gpio-vbus-usb.c usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); otg 144 drivers/usb/phy/phy-gpio-vbus-usb.c gpio_vbus->phy.otg->state = OTG_STATE_B_IDLE; otg 148 drivers/usb/phy/phy-gpio-vbus-usb.c status, gpio_vbus->phy.otg->gadget); otg 159 drivers/usb/phy/phy-gpio-vbus-usb.c struct usb_otg *otg = gpio_vbus->phy.otg; otg 163 drivers/usb/phy/phy-gpio-vbus-usb.c otg->gadget ? otg->gadget->name : "none"); otg 165 drivers/usb/phy/phy-gpio-vbus-usb.c if (otg->gadget) otg 174 drivers/usb/phy/phy-gpio-vbus-usb.c static int gpio_vbus_set_peripheral(struct usb_otg *otg, otg 182 drivers/usb/phy/phy-gpio-vbus-usb.c gpio_vbus = container_of(otg->usb_phy, struct gpio_vbus_data, phy); otg 189 drivers/usb/phy/phy-gpio-vbus-usb.c otg->gadget->name); otg 197 drivers/usb/phy/phy-gpio-vbus-usb.c usb_gadget_vbus_disconnect(otg->gadget); otg 198 drivers/usb/phy/phy-gpio-vbus-usb.c otg->state = OTG_STATE_UNDEFINED; otg 200 drivers/usb/phy/phy-gpio-vbus-usb.c otg->gadget = NULL; otg 204 drivers/usb/phy/phy-gpio-vbus-usb.c otg->gadget = gadget; otg 220 drivers/usb/phy/phy-gpio-vbus-usb.c if (phy->otg->state == OTG_STATE_B_PERIPHERAL) otg 260 drivers/usb/phy/phy-gpio-vbus-usb.c gpio_vbus->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg), otg 262 drivers/usb/phy/phy-gpio-vbus-usb.c if (!gpio_vbus->phy.otg) otg 272 drivers/usb/phy/phy-gpio-vbus-usb.c gpio_vbus->phy.otg->state = OTG_STATE_UNDEFINED; otg 273 drivers/usb/phy/phy-gpio-vbus-usb.c gpio_vbus->phy.otg->usb_phy = &gpio_vbus->phy; otg 274 drivers/usb/phy/phy-gpio-vbus-usb.c gpio_vbus->phy.otg->set_peripheral = gpio_vbus_set_peripheral; otg 224 drivers/usb/phy/phy-isp1301-omap.c return usb_otg_state_string(isp->phy.otg->state); otg 239 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_UNDEFINED; otg 268 drivers/usb/phy/phy-isp1301-omap.c if (!isp->phy.otg->host) otg 274 drivers/usb/phy/phy-isp1301-omap.c dev = isp->phy.otg->host->controller; otg 286 drivers/usb/phy/phy-isp1301-omap.c if (!isp->phy.otg->host) otg 289 drivers/usb/phy/phy-isp1301-omap.c dev = isp->phy.otg->host->controller; otg 296 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->gadget->b_hnp_enable = 0; otg 297 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->gadget->a_hnp_support = 0; otg 298 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->gadget->a_alt_hnp_support = 0; otg 299 drivers/usb/phy/phy-isp1301-omap.c return usb_gadget_vbus_disconnect(isp->phy.otg->gadget); otg 329 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->state == OTG_STATE_A_IDLE) otg 332 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->default_a = 1; otg 333 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->host) { otg 334 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->host->is_b_host = 0; otg 337 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->gadget) { otg 338 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->gadget->is_a_peripheral = 1; otg 341 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_IDLE; otg 353 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->state == OTG_STATE_B_IDLE) otg 356 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->default_a = 0; otg 357 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->host) { otg 358 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->host->is_b_host = 1; otg 361 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->gadget) { otg 362 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->gadget->is_a_peripheral = 0; otg 365 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_IDLE; otg 464 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->state == state && !extra) otg 488 drivers/usb/phy/phy-isp1301-omap.c else if (isp->phy.otg->state == OTG_STATE_A_WAIT_VFALL) { otg 495 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->state == OTG_STATE_B_IDLE otg 496 drivers/usb/phy/phy-isp1301-omap.c || isp->phy.otg->state otg 503 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->state == OTG_STATE_A_IDLE otg 504 drivers/usb/phy/phy-isp1301-omap.c || isp->phy.otg->state == OTG_STATE_UNDEFINED) { otg 538 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 544 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->gadget->b_hnp_enable) { otg 545 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_WAIT_ACON; otg 572 drivers/usb/phy/phy-isp1301-omap.c if (!(isp->phy.otg->host)) otg 575 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 586 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_WAIT_VFALL; otg 595 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_WAIT_VRISE; otg 615 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 619 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_PERIPHERAL; otg 625 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_PERIPHERAL; otg 646 drivers/usb/phy/phy-isp1301-omap.c struct usb_otg *otg = isp->phy.otg; otg 663 drivers/usb/phy/phy-isp1301-omap.c if (isp->phy.otg->state == OTG_STATE_B_SRP_INIT) otg 681 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_PERIPHERAL; otg 693 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 695 drivers/usb/phy/phy-isp1301-omap.c if (!otg->host) otg 724 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_WAIT_VFALL; otg 738 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_VBUS_ERR; otg 759 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 775 drivers/usb/phy/phy-isp1301-omap.c if (otg->host) { otg 776 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 778 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_HOST; otg 783 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_HOST; otg 787 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_WAIT_BCON; otg 801 drivers/usb/phy/phy-isp1301-omap.c usb_bus_start_enum(otg->host, otg->host->otg_port); otg 916 drivers/usb/phy/phy-isp1301-omap.c usb_gadget_vbus_connect(isp->phy.otg->gadget); otg 926 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_PERIPHERAL; otg 934 drivers/usb/phy/phy-isp1301-omap.c struct usb_otg *otg = isp->phy.otg; otg 936 drivers/usb/phy/phy-isp1301-omap.c enum usb_otg_state state = isp->phy.otg->state; otg 944 drivers/usb/phy/phy-isp1301-omap.c if (otg->default_a) { otg 959 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_HOST; otg 967 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_VBUS_ERR; otg 976 drivers/usb/phy/phy-isp1301-omap.c usb_gadget_vbus_disconnect(otg->gadget); otg 983 drivers/usb/phy/phy-isp1301-omap.c if (otg->host && state == OTG_STATE_A_IDLE) otg 993 drivers/usb/phy/phy-isp1301-omap.c if (otg->default_a) { otg 996 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_WAIT_VFALL; otg 1009 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_IDLE; otg 1020 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 1042 drivers/usb/phy/phy-isp1301-omap.c if (otg->gadget && (isp_bstat & OTG_B_SESS_VLD)) { otg 1060 drivers/usb/phy/phy-isp1301-omap.c if (state != isp->phy.otg->state) otg 1118 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 1121 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_A_HOST; otg 1130 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_HOST; otg 1193 drivers/usb/phy/phy-isp1301-omap.c kfree(isp->phy.otg); otg 1263 drivers/usb/phy/phy-isp1301-omap.c isp1301_set_host(struct usb_otg *otg, struct usb_bus *host) otg 1265 drivers/usb/phy/phy-isp1301-omap.c struct isp1301 *isp = container_of(otg->usb_phy, struct isp1301, phy); otg 1273 drivers/usb/phy/phy-isp1301-omap.c otg->host = NULL; otg 1278 drivers/usb/phy/phy-isp1301-omap.c otg->host = host; otg 1281 drivers/usb/phy/phy-isp1301-omap.c if (otg->gadget) otg 1287 drivers/usb/phy/phy-isp1301-omap.c otg->host = host; otg 1319 drivers/usb/phy/phy-isp1301-omap.c isp1301_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) otg 1321 drivers/usb/phy/phy-isp1301-omap.c struct isp1301 *isp = container_of(otg->usb_phy, struct isp1301, phy); otg 1328 drivers/usb/phy/phy-isp1301-omap.c if (!otg->default_a) otg 1330 drivers/usb/phy/phy-isp1301-omap.c usb_gadget_vbus_disconnect(otg->gadget); otg 1331 drivers/usb/phy/phy-isp1301-omap.c otg->gadget = NULL; otg 1337 drivers/usb/phy/phy-isp1301-omap.c otg->gadget = gadget; otg 1340 drivers/usb/phy/phy-isp1301-omap.c if (otg->host) otg 1345 drivers/usb/phy/phy-isp1301-omap.c otg->gadget = gadget; otg 1358 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_IDLE; otg 1393 drivers/usb/phy/phy-isp1301-omap.c if (dev->otg->state == OTG_STATE_B_PERIPHERAL) otg 1399 drivers/usb/phy/phy-isp1301-omap.c isp1301_start_srp(struct usb_otg *otg) otg 1401 drivers/usb/phy/phy-isp1301-omap.c struct isp1301 *isp = container_of(otg->usb_phy, struct isp1301, phy); otg 1404 drivers/usb/phy/phy-isp1301-omap.c if (isp != the_transceiver || isp->phy.otg->state != OTG_STATE_B_IDLE) otg 1414 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_SRP_INIT; otg 1425 drivers/usb/phy/phy-isp1301-omap.c isp1301_start_hnp(struct usb_otg *otg) otg 1428 drivers/usb/phy/phy-isp1301-omap.c struct isp1301 *isp = container_of(otg->usb_phy, struct isp1301, phy); otg 1433 drivers/usb/phy/phy-isp1301-omap.c if (otg->default_a && (otg->host == NULL || !otg->host->b_hnp_enable)) otg 1435 drivers/usb/phy/phy-isp1301-omap.c if (!otg->default_a && (otg->gadget == NULL otg 1436 drivers/usb/phy/phy-isp1301-omap.c || !otg->gadget->b_hnp_enable)) otg 1442 drivers/usb/phy/phy-isp1301-omap.c switch (isp->phy.otg->state) { otg 1444 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->state = OTG_STATE_B_PERIPHERAL; otg 1454 drivers/usb/phy/phy-isp1301-omap.c usb_gadget_vbus_connect(otg->gadget); otg 1491 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg = kzalloc(sizeof *isp->phy.otg, GFP_KERNEL); otg 1492 drivers/usb/phy/phy-isp1301-omap.c if (!isp->phy.otg) { otg 1571 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->usb_phy = &isp->phy; otg 1572 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->set_host = isp1301_set_host, otg 1573 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->set_peripheral = isp1301_set_peripheral, otg 1574 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->start_srp = isp1301_start_srp, otg 1575 drivers/usb/phy/phy-isp1301-omap.c isp->phy.otg->start_hnp = isp1301_start_hnp, otg 1601 drivers/usb/phy/phy-isp1301-omap.c kfree(isp->phy.otg); otg 51 drivers/usb/phy/phy-mv-usb.c static int mv_otg_set_vbus(struct usb_otg *otg, bool on) otg 53 drivers/usb/phy/phy-mv-usb.c struct mv_otg *mvotg = container_of(otg->usb_phy, struct mv_otg, phy); otg 60 drivers/usb/phy/phy-mv-usb.c static int mv_otg_set_host(struct usb_otg *otg, otg 63 drivers/usb/phy/phy-mv-usb.c otg->host = host; otg 68 drivers/usb/phy/phy-mv-usb.c static int mv_otg_set_peripheral(struct usb_otg *otg, otg 71 drivers/usb/phy/phy-mv-usb.c otg->gadget = gadget; otg 196 drivers/usb/phy/phy-mv-usb.c struct usb_otg *otg = mvotg->phy.otg; otg 199 drivers/usb/phy/phy-mv-usb.c if (!otg->host) otg 204 drivers/usb/phy/phy-mv-usb.c hcd = bus_to_hcd(otg->host); otg 217 drivers/usb/phy/phy-mv-usb.c struct usb_otg *otg = mvotg->phy.otg; otg 219 drivers/usb/phy/phy-mv-usb.c if (!otg->gadget) otg 225 drivers/usb/phy/phy-mv-usb.c usb_gadget_vbus_connect(otg->gadget); otg 227 drivers/usb/phy/phy-mv-usb.c usb_gadget_vbus_disconnect(otg->gadget); otg 332 drivers/usb/phy/phy-mv-usb.c int old_state = mvotg->phy.otg->state; otg 336 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_B_IDLE; otg 340 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_IDLE; otg 342 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_B_PERIPHERAL; otg 346 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_B_IDLE; otg 350 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_B_IDLE; otg 353 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_WAIT_VRISE; otg 357 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_WAIT_BCON; otg 364 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_WAIT_VFALL; otg 369 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_VBUS_ERR; otg 373 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_HOST; otg 379 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_WAIT_BCON; otg 381 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_VBUS_ERR; otg 387 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_IDLE; otg 393 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state = OTG_STATE_A_WAIT_VFALL; otg 404 drivers/usb/phy/phy-mv-usb.c struct usb_otg *otg; otg 411 drivers/usb/phy/phy-mv-usb.c otg = mvotg->phy.otg; otg 412 drivers/usb/phy/phy-mv-usb.c old_state = otg->state; otg 420 drivers/usb/phy/phy-mv-usb.c if (old_state != mvotg->phy.otg->state) { otg 423 drivers/usb/phy/phy-mv-usb.c state_string[mvotg->phy.otg->state]); otg 425 drivers/usb/phy/phy-mv-usb.c switch (mvotg->phy.otg->state) { otg 427 drivers/usb/phy/phy-mv-usb.c otg->default_a = 0; otg 440 drivers/usb/phy/phy-mv-usb.c otg->default_a = 1; otg 447 drivers/usb/phy/phy-mv-usb.c mv_otg_set_vbus(otg, 1); otg 468 drivers/usb/phy/phy-mv-usb.c mv_otg_set_vbus(otg, 0); otg 537 drivers/usb/phy/phy-mv-usb.c if (mvotg->phy.otg->state != OTG_STATE_B_IDLE otg 538 drivers/usb/phy/phy-mv-usb.c && mvotg->phy.otg->state != OTG_STATE_A_IDLE) otg 567 drivers/usb/phy/phy-mv-usb.c if (!mvotg->phy.otg->default_a) otg 603 drivers/usb/phy/phy-mv-usb.c if (!mvotg->phy.otg->default_a) otg 669 drivers/usb/phy/phy-mv-usb.c struct usb_otg *otg; otg 682 drivers/usb/phy/phy-mv-usb.c otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); otg 683 drivers/usb/phy/phy-mv-usb.c if (!otg) otg 706 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg = otg; otg 709 drivers/usb/phy/phy-mv-usb.c otg->state = OTG_STATE_UNDEFINED; otg 710 drivers/usb/phy/phy-mv-usb.c otg->usb_phy = &mvotg->phy; otg 711 drivers/usb/phy/phy-mv-usb.c otg->set_host = mv_otg_set_host; otg 712 drivers/usb/phy/phy-mv-usb.c otg->set_peripheral = mv_otg_set_peripheral; otg 713 drivers/usb/phy/phy-mv-usb.c otg->set_vbus = mv_otg_set_vbus; otg 841 drivers/usb/phy/phy-mv-usb.c if (mvotg->phy.otg->state != OTG_STATE_B_IDLE) { otg 844 drivers/usb/phy/phy-mv-usb.c mvotg->phy.otg->state); otg 77 drivers/usb/phy/phy-tahvo.c switch (tu->phy.otg->state) { otg 80 drivers/usb/phy/phy-tahvo.c if (tu->phy.otg->gadget) otg 81 drivers/usb/phy/phy-tahvo.c usb_gadget_vbus_connect(tu->phy.otg->gadget); otg 82 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_B_PERIPHERAL; otg 90 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_A_HOST; otg 97 drivers/usb/phy/phy-tahvo.c switch (tu->phy.otg->state) { otg 99 drivers/usb/phy/phy-tahvo.c if (tu->phy.otg->gadget) otg 100 drivers/usb/phy/phy-tahvo.c usb_gadget_vbus_disconnect(tu->phy.otg->gadget); otg 101 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_B_IDLE; otg 105 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_A_IDLE; otg 130 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_A_IDLE; otg 137 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_A_IDLE; otg 149 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_B_IDLE; otg 156 drivers/usb/phy/phy-tahvo.c if (tu->phy.otg->gadget) otg 157 drivers/usb/phy/phy-tahvo.c usb_gadget_vbus_disconnect(tu->phy.otg->gadget); otg 158 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_B_IDLE; otg 166 drivers/usb/phy/phy-tahvo.c if (tu->phy.otg->gadget) otg 167 drivers/usb/phy/phy-tahvo.c usb_gadget_vbus_disconnect(tu->phy.otg->gadget); otg 171 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_UNDEFINED; otg 192 drivers/usb/phy/phy-tahvo.c static int tahvo_usb_set_host(struct usb_otg *otg, struct usb_bus *host) otg 194 drivers/usb/phy/phy-tahvo.c struct tahvo_usb *tu = container_of(otg->usb_phy, struct tahvo_usb, otg 204 drivers/usb/phy/phy-tahvo.c otg->host = NULL; otg 210 drivers/usb/phy/phy-tahvo.c otg->host = NULL; otg 214 drivers/usb/phy/phy-tahvo.c otg->host = host; otg 221 drivers/usb/phy/phy-tahvo.c static int tahvo_usb_set_peripheral(struct usb_otg *otg, otg 224 drivers/usb/phy/phy-tahvo.c struct tahvo_usb *tu = container_of(otg->usb_phy, struct tahvo_usb, otg 234 drivers/usb/phy/phy-tahvo.c tu->phy.otg->gadget = NULL; otg 239 drivers/usb/phy/phy-tahvo.c tu->phy.otg->gadget = gadget; otg 286 drivers/usb/phy/phy-tahvo.c if (tu->phy.otg->host) { otg 298 drivers/usb/phy/phy-tahvo.c if (tu->phy.otg->gadget) { otg 332 drivers/usb/phy/phy-tahvo.c tu->phy.otg = devm_kzalloc(&pdev->dev, sizeof(*tu->phy.otg), otg 334 drivers/usb/phy/phy-tahvo.c if (!tu->phy.otg) otg 379 drivers/usb/phy/phy-tahvo.c tu->phy.otg->state = OTG_STATE_UNDEFINED; otg 383 drivers/usb/phy/phy-tahvo.c tu->phy.otg->usb_phy = &tu->phy; otg 384 drivers/usb/phy/phy-tahvo.c tu->phy.otg->set_host = tahvo_usb_set_host; otg 385 drivers/usb/phy/phy-tahvo.c tu->phy.otg->set_peripheral = tahvo_usb_set_peripheral; otg 35 drivers/usb/phy/phy-ulpi-viewport.c static int ulpi_viewport_read(struct usb_phy *otg, u32 reg) otg 38 drivers/usb/phy/phy-ulpi-viewport.c void __iomem *view = otg->io_priv; otg 53 drivers/usb/phy/phy-ulpi-viewport.c static int ulpi_viewport_write(struct usb_phy *otg, u32 val, u32 reg) otg 56 drivers/usb/phy/phy-ulpi-viewport.c void __iomem *view = otg->io_priv; otg 199 drivers/usb/phy/phy-ulpi.c static int ulpi_set_host(struct usb_otg *otg, struct usb_bus *host) otg 201 drivers/usb/phy/phy-ulpi.c struct usb_phy *phy = otg->usb_phy; otg 205 drivers/usb/phy/phy-ulpi.c otg->host = NULL; otg 209 drivers/usb/phy/phy-ulpi.c otg->host = host; otg 225 drivers/usb/phy/phy-ulpi.c static int ulpi_set_vbus(struct usb_otg *otg, bool on) otg 227 drivers/usb/phy/phy-ulpi.c struct usb_phy *phy = otg->usb_phy; otg 248 drivers/usb/phy/phy-ulpi.c struct usb_otg *otg; otg 254 drivers/usb/phy/phy-ulpi.c otg = kzalloc(sizeof(*otg), GFP_KERNEL); otg 255 drivers/usb/phy/phy-ulpi.c if (!otg) { otg 263 drivers/usb/phy/phy-ulpi.c phy->otg = otg; otg 266 drivers/usb/phy/phy-ulpi.c otg->usb_phy = phy; otg 267 drivers/usb/phy/phy-ulpi.c otg->set_host = ulpi_set_host; otg 268 drivers/usb/phy/phy-ulpi.c otg->set_vbus = ulpi_set_vbus; otg 962 drivers/usb/renesas_usbhs/mod_gadget.c ret = otg_set_peripheral(gpriv->transceiver->otg, otg 988 drivers/usb/renesas_usbhs/mod_gadget.c otg_set_peripheral(gpriv->transceiver->otg, NULL); otg 10 include/linux/platform_data/usb-ehci-mxc.h struct usb_phy *otg; otg 24 include/linux/platform_data/usb-omap1.h u8 otg; /* port number, 1-based: usb1 == 2 */ otg 192 include/linux/usb/otg-fsm.h struct usb_otg *otg; otg 28 include/linux/usb/otg.h int (*set_host)(struct usb_otg *otg, struct usb_bus *host); otg 31 include/linux/usb/otg.h int (*set_peripheral)(struct usb_otg *otg, otg 35 include/linux/usb/otg.h int (*set_vbus)(struct usb_otg *otg, bool enabled); otg 38 include/linux/usb/otg.h int (*start_srp)(struct usb_otg *otg); otg 41 include/linux/usb/otg.h int (*start_hnp)(struct usb_otg *otg); otg 64 include/linux/usb/otg.h otg_start_hnp(struct usb_otg *otg) otg 66 include/linux/usb/otg.h if (otg && otg->start_hnp) otg 67 include/linux/usb/otg.h return otg->start_hnp(otg); otg 74 include/linux/usb/otg.h otg_set_vbus(struct usb_otg *otg, bool enabled) otg 76 include/linux/usb/otg.h if (otg && otg->set_vbus) otg 77 include/linux/usb/otg.h return otg->set_vbus(otg, enabled); otg 84 include/linux/usb/otg.h otg_set_host(struct usb_otg *otg, struct usb_bus *host) otg 86 include/linux/usb/otg.h if (otg && otg->set_host) otg 87 include/linux/usb/otg.h return otg->set_host(otg, host); otg 96 include/linux/usb/otg.h otg_set_peripheral(struct usb_otg *otg, struct usb_gadget *periph) otg 98 include/linux/usb/otg.h if (otg && otg->set_peripheral) otg 99 include/linux/usb/otg.h return otg->set_peripheral(otg, periph); otg 105 include/linux/usb/otg.h otg_start_srp(struct usb_otg *otg) otg 107 include/linux/usb/otg.h if (otg && otg->start_srp) otg 108 include/linux/usb/otg.h return otg->start_srp(otg); otg 96 include/linux/usb/phy.h struct usb_otg *otg;