/drivers/usb/phy/ |
D | phy-isp1301-omap.c | 237 return usb_otg_state_string(isp->phy.otg->state); in state_name() 252 isp->phy.otg->state = OTG_STATE_UNDEFINED; in power_down() 281 if (!isp->phy.otg->host) in host_suspend() 287 dev = isp->phy.otg->host->controller; in host_suspend() 299 if (!isp->phy.otg->host) in host_resume() 302 dev = isp->phy.otg->host->controller; in host_resume() 309 isp->phy.otg->gadget->b_hnp_enable = 0; in gadget_suspend() 310 isp->phy.otg->gadget->a_hnp_support = 0; in gadget_suspend() 311 isp->phy.otg->gadget->a_alt_hnp_support = 0; in gadget_suspend() 312 return usb_gadget_vbus_disconnect(isp->phy.otg->gadget); in gadget_suspend() [all …]
|
D | phy-tahvo.c | 85 switch (tu->phy.otg->state) { in check_vbus_state() 88 if (tu->phy.otg->gadget) in check_vbus_state() 89 usb_gadget_vbus_connect(tu->phy.otg->gadget); in check_vbus_state() 90 tu->phy.otg->state = OTG_STATE_B_PERIPHERAL; in check_vbus_state() 98 tu->phy.otg->state = OTG_STATE_A_HOST; in check_vbus_state() 105 switch (tu->phy.otg->state) { in check_vbus_state() 107 if (tu->phy.otg->gadget) in check_vbus_state() 108 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in check_vbus_state() 109 tu->phy.otg->state = OTG_STATE_B_IDLE; in check_vbus_state() 113 tu->phy.otg->state = OTG_STATE_A_IDLE; in check_vbus_state() [all …]
|
D | phy-mv-usb.c | 57 static int mv_otg_set_vbus(struct usb_otg *otg, bool on) in mv_otg_set_vbus() argument 59 struct mv_otg *mvotg = container_of(otg->usb_phy, struct mv_otg, phy); in mv_otg_set_vbus() 66 static int mv_otg_set_host(struct usb_otg *otg, in mv_otg_set_host() argument 69 otg->host = host; in mv_otg_set_host() 74 static int mv_otg_set_peripheral(struct usb_otg *otg, in mv_otg_set_peripheral() argument 77 otg->gadget = gadget; in mv_otg_set_peripheral() 205 struct usb_otg *otg = mvotg->phy.otg; in mv_otg_start_host() local 208 if (!otg->host) in mv_otg_start_host() 213 hcd = bus_to_hcd(otg->host); in mv_otg_start_host() 226 struct usb_otg *otg = mvotg->phy.otg; in mv_otg_start_periphrals() local [all …]
|
D | phy-fsl-usb.c | 264 if ((fsl_otg_dev->phy.otg->state == OTG_STATE_B_SRP_INIT) && in b_srp_end() 277 if (!fsl_otg_dev->phy.otg->host->b_hnp_enable) in a_wait_enum() 465 struct usb_otg *otg = fsm->otg; in fsl_otg_start_host() local 468 container_of(otg->usb_phy, struct fsl_otg, phy); in fsl_otg_start_host() 471 if (!otg->host) in fsl_otg_start_host() 473 dev = otg->host->controller; in fsl_otg_start_host() 532 struct usb_otg *otg = fsm->otg; in fsl_otg_start_gadget() local 535 if (!otg->gadget || !otg->gadget->dev.parent) in fsl_otg_start_gadget() 539 dev = otg->gadget->dev.parent; in fsl_otg_start_gadget() 556 static int fsl_otg_set_host(struct usb_otg *otg, struct usb_bus *host) in fsl_otg_set_host() argument [all …]
|
D | phy-gpio-vbus-usb.c | 107 if (!gpio_vbus->phy.otg->gadget) in gpio_vbus_work() 124 gpio_vbus->phy.otg->state = OTG_STATE_B_PERIPHERAL; in gpio_vbus_work() 126 usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 136 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 145 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 147 gpio_vbus->phy.otg->state = OTG_STATE_B_IDLE; in gpio_vbus_work() 151 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work() 162 struct usb_otg *otg = gpio_vbus->phy.otg; in gpio_vbus_irq() local 166 otg->gadget ? otg->gadget->name : "none"); in gpio_vbus_irq() 168 if (otg->gadget) in gpio_vbus_irq() [all …]
|
D | phy-generic.c | 109 struct usb_otg *otg = nop->phy.otg; in nop_gpio_vbus_thread() local 119 otg->state = OTG_STATE_B_PERIPHERAL; in nop_gpio_vbus_thread() 121 usb_gadget_vbus_connect(otg->gadget); in nop_gpio_vbus_thread() 127 otg->gadget); in nop_gpio_vbus_thread() 131 usb_gadget_vbus_disconnect(otg->gadget); in nop_gpio_vbus_thread() 133 otg->state = OTG_STATE_B_IDLE; in nop_gpio_vbus_thread() 137 otg->gadget); in nop_gpio_vbus_thread() 176 static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) in nop_set_peripheral() argument 178 if (!otg) in nop_set_peripheral() 182 otg->gadget = NULL; in nop_set_peripheral() [all …]
|
D | phy-msm-usb.c | 487 struct usb_bus *bus = phy->otg->host; in msm_otg_suspend() 584 struct usb_bus *bus = phy->otg->host; in msm_otg_resume() 692 if (!phy->otg->host) in msm_otg_start_host() 695 hcd = bus_to_hcd(phy->otg->host); in msm_otg_start_host() 726 static int msm_otg_set_host(struct usb_otg *otg, struct usb_bus *host) in msm_otg_set_host() argument 728 struct msm_otg *motg = container_of(otg->usb_phy, struct msm_otg, phy); in msm_otg_set_host() 736 dev_info(otg->usb_phy->dev, "Host mode is not supported\n"); in msm_otg_set_host() 741 if (otg->state == OTG_STATE_A_HOST) { in msm_otg_set_host() 742 pm_runtime_get_sync(otg->usb_phy->dev); in msm_otg_set_host() 743 msm_otg_start_host(otg->usb_phy, 0); in msm_otg_set_host() [all …]
|
D | phy-ulpi.c | 212 static int ulpi_set_host(struct usb_otg *otg, struct usb_bus *host) in ulpi_set_host() argument 214 struct usb_phy *phy = otg->usb_phy; in ulpi_set_host() 218 otg->host = NULL; in ulpi_set_host() 222 otg->host = host; in ulpi_set_host() 238 static int ulpi_set_vbus(struct usb_otg *otg, bool on) in ulpi_set_vbus() argument 240 struct usb_phy *phy = otg->usb_phy; in ulpi_set_vbus() 261 struct usb_otg *otg; in otg_ulpi_create() local 267 otg = kzalloc(sizeof(*otg), GFP_KERNEL); in otg_ulpi_create() 268 if (!otg) { in otg_ulpi_create() 276 phy->otg = otg; in otg_ulpi_create() [all …]
|
D | phy-ab8500-usb.c | 442 ab->phy.otg->default_a = false; in ab9540_usb_link_status_update() 447 ab->phy.otg->state = OTG_STATE_B_IDLE; in ab9540_usb_link_status_update() 493 ab->phy.otg->default_a = true; in ab9540_usb_link_status_update() 514 ab->phy.otg->default_a = false; in ab9540_usb_link_status_update() 529 ab->phy.otg->default_a = false; in ab9540_usb_link_status_update() 582 ab->phy.otg->default_a = false; in ab8540_usb_link_status_update() 590 ab->phy.otg->state = OTG_STATE_B_IDLE; in ab8540_usb_link_status_update() 622 ab->phy.otg->default_a = true; in ab8540_usb_link_status_update() 641 ab->phy.otg->default_a = false; in ab8540_usb_link_status_update() 655 ab->phy.otg->default_a = false; in ab8540_usb_link_status_update() [all …]
|
D | phy-ulpi-viewport.c | 44 static int ulpi_viewport_read(struct usb_phy *otg, u32 reg) in ulpi_viewport_read() argument 47 void __iomem *view = otg->io_priv; in ulpi_viewport_read() 62 static int ulpi_viewport_write(struct usb_phy *otg, u32 val, u32 reg) in ulpi_viewport_write() argument 65 void __iomem *view = otg->io_priv; in ulpi_viewport_write()
|
/drivers/phy/ |
D | phy-exynos5250-usb2.c | 204 u32 otg; in exynos5250_power_on() local 217 otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on() 219 otg &= ~EXYNOS_5250_USBOTGSYS_FSEL_MASK; in exynos5250_power_on() 220 otg |= drv->ref_reg_val << EXYNOS_5250_USBOTGSYS_FSEL_SHIFT; in exynos5250_power_on() 222 otg &= ~(EXYNOS_5250_USBOTGSYS_FORCE_SUSPEND | in exynos5250_power_on() 225 otg |= EXYNOS_5250_USBOTGSYS_PHY_SW_RST | in exynos5250_power_on() 230 otg &= ~EXYNOS_5250_USBOTGSYS_REFCLKSEL_MASK; in exynos5250_power_on() 231 otg |= EXYNOS_5250_REFCLKSEL_CLKCORE << in exynos5250_power_on() 233 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on() 235 otg &= ~(EXYNOS_5250_USBOTGSYS_PHY_SW_RST | in exynos5250_power_on() [all …]
|
D | phy-omap-usb2.c | 61 static int omap_usb_set_vbus(struct usb_otg *otg, bool enabled) in omap_usb_set_vbus() argument 63 struct omap_usb *phy = phy_to_omapusb(otg->usb_phy); in omap_usb_set_vbus() 71 static int omap_usb_start_srp(struct usb_otg *otg) in omap_usb_start_srp() argument 73 struct omap_usb *phy = phy_to_omapusb(otg->usb_phy); in omap_usb_start_srp() 81 static int omap_usb_set_host(struct usb_otg *otg, struct usb_bus *host) in omap_usb_set_host() argument 83 otg->host = host; in omap_usb_set_host() 85 otg->state = OTG_STATE_UNDEFINED; in omap_usb_set_host() 90 static int omap_usb_set_peripheral(struct usb_otg *otg, in omap_usb_set_peripheral() argument 93 otg->gadget = gadget; in omap_usb_set_peripheral() 95 otg->state = OTG_STATE_UNDEFINED; in omap_usb_set_peripheral() [all …]
|
D | phy-dm816x-usb.c | 62 static int dm816x_usb_phy_set_host(struct usb_otg *otg, struct usb_bus *host) in dm816x_usb_phy_set_host() argument 64 otg->host = host; in dm816x_usb_phy_set_host() 66 otg->state = OTG_STATE_UNDEFINED; in dm816x_usb_phy_set_host() 71 static int dm816x_usb_phy_set_peripheral(struct usb_otg *otg, in dm816x_usb_phy_set_peripheral() argument 74 otg->gadget = gadget; in dm816x_usb_phy_set_peripheral() 76 otg->state = OTG_STATE_UNDEFINED; in dm816x_usb_phy_set_peripheral() 190 struct usb_otg *otg; in dm816x_usb_phy_probe() local 225 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in dm816x_usb_phy_probe() 226 if (!otg) in dm816x_usb_phy_probe() 232 phy->phy.otg = otg; in dm816x_usb_phy_probe() [all …]
|
D | phy-twl4030-usb.c | 605 static int twl4030_set_peripheral(struct usb_otg *otg, in twl4030_set_peripheral() argument 608 if (!otg) in twl4030_set_peripheral() 611 otg->gadget = gadget; in twl4030_set_peripheral() 613 otg->state = OTG_STATE_UNDEFINED; in twl4030_set_peripheral() 618 static int twl4030_set_host(struct usb_otg *otg, struct usb_bus *host) in twl4030_set_host() argument 620 if (!otg) in twl4030_set_host() 623 otg->host = host; in twl4030_set_host() 625 otg->state = OTG_STATE_UNDEFINED; in twl4030_set_host() 648 struct usb_otg *otg; in twl4030_usb_probe() local 666 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in twl4030_usb_probe() [all …]
|
/drivers/usb/musb/ |
D | musb_virthub.c | 72 musb->xceiv->otg->state = OTG_STATE_A_HOST; in musb_host_finish_resume() 79 struct usb_otg *otg = musb->xceiv->otg; in musb_port_suspend() local 114 switch (musb->xceiv->otg->state) { in musb_port_suspend() 116 musb->xceiv->otg->state = OTG_STATE_A_SUSPEND; in musb_port_suspend() 117 musb->is_active = otg->host->b_hnp_enable; in musb_port_suspend() 125 musb->xceiv->otg->state = OTG_STATE_B_WAIT_ACON; in musb_port_suspend() 126 musb->is_active = otg->host->b_hnp_enable; in musb_port_suspend() 131 usb_otg_state_string(musb->xceiv->otg->state)); in musb_port_suspend() 153 if (musb->xceiv->otg->state == OTG_STATE_B_IDLE) { in musb_port_reset() 226 struct usb_otg *otg = musb->xceiv->otg; in musb_root_disconnect() local [all …]
|
D | omap2430.c | 68 switch (musb->xceiv->otg->state) { in musb_do_idle() 73 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in musb_do_idle() 76 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in musb_do_idle() 93 musb->xceiv->otg->state = OTG_STATE_A_HOST; in musb_do_idle() 99 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in musb_do_idle() 101 musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; in musb_do_idle() 119 && (musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON))) { in omap2430_musb_try_idle() 121 usb_otg_state_string(musb->xceiv->otg->state)); in omap2430_musb_try_idle() 138 usb_otg_state_string(musb->xceiv->otg->state), in omap2430_musb_try_idle() 145 struct usb_otg *otg = musb->xceiv->otg; in omap2430_musb_set_vbus() local [all …]
|
D | da8xx.c | 201 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer() 204 switch (musb->xceiv->otg->state) { in otg_timer() 211 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in otg_timer() 214 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() 229 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in otg_timer() 251 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() 268 musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON)) { in da8xx_musb_try_idle() 270 usb_otg_state_string(musb->xceiv->otg->state)); in da8xx_musb_try_idle() 283 usb_otg_state_string(musb->xceiv->otg->state), in da8xx_musb_try_idle() 292 struct usb_otg *otg = musb->xceiv->otg; in da8xx_musb_interrupt() local [all …]
|
D | am35x.c | 152 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer() 155 switch (musb->xceiv->otg->state) { in otg_timer() 162 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in otg_timer() 165 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() 170 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in otg_timer() 179 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() 196 musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON)) { in am35x_musb_try_idle() 198 usb_otg_state_string(musb->xceiv->otg->state)); in am35x_musb_try_idle() 211 usb_otg_state_string(musb->xceiv->otg->state), in am35x_musb_try_idle() 223 struct usb_otg *otg = musb->xceiv->otg; in am35x_musb_interrupt() local [all …]
|
D | tusb6010.c | 344 if (x->otg->default_a || mA < (musb->min_power << 1)) in tusb_draw_power() 465 switch (musb->xceiv->otg->state) { in musb_do_idle() 471 usb_otg_state_string(musb->xceiv->otg->state)); in musb_do_idle() 524 && (musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON))) { in tusb_musb_try_idle() 526 usb_otg_state_string(musb->xceiv->otg->state)); in tusb_musb_try_idle() 543 usb_otg_state_string(musb->xceiv->otg->state), in tusb_musb_try_idle() 560 struct usb_otg *otg = musb->xceiv->otg; in tusb_musb_set_vbus() local 573 otg->default_a = 1; in tusb_musb_set_vbus() 574 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in tusb_musb_set_vbus() 587 switch (musb->xceiv->otg->state) { in tusb_musb_set_vbus() [all …]
|
D | davinci.c | 217 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer() 220 switch (musb->xceiv->otg->state) { in otg_timer() 231 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in otg_timer() 254 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() 267 struct usb_otg *otg = musb->xceiv->otg; in davinci_musb_interrupt() local 328 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; in davinci_musb_interrupt() 333 otg->default_a = 1; in davinci_musb_interrupt() 334 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in davinci_musb_interrupt() 340 otg->default_a = 0; in davinci_musb_interrupt() 341 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in davinci_musb_interrupt() [all …]
|
D | musb_core.c | 462 switch (musb->xceiv->otg->state) { in musb_otg_timer_func() 466 musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; in musb_otg_timer_func() 472 usb_otg_state_string(musb->xceiv->otg->state)); in musb_otg_timer_func() 474 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; in musb_otg_timer_func() 478 usb_otg_state_string(musb->xceiv->otg->state)); in musb_otg_timer_func() 493 usb_otg_state_string(musb->xceiv->otg->state)); in musb_hnp_stop() 495 switch (musb->xceiv->otg->state) { in musb_hnp_stop() 499 usb_otg_state_string(musb->xceiv->otg->state)); in musb_hnp_stop() 505 musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; in musb_hnp_stop() 514 usb_otg_state_string(musb->xceiv->otg->state)); in musb_hnp_stop() [all …]
|
/drivers/usb/common/ |
D | usb-otg-fsm.c | 128 if (fsm->otg->state == new_state) in otg_set_state() 131 otg_leave_state(fsm, fsm->otg->state); in otg_set_state() 171 usb_bus_start_enum(fsm->otg->host, in otg_set_state() 172 fsm->otg->host->otg_port); in otg_set_state() 240 fsm->otg->state = new_state; in otg_set_state() 251 state = fsm->otg->state; in otg_statemachine() 266 else if (fsm->b_sess_vld && fsm->otg->gadget) in otg_statemachine() 279 else if (fsm->b_bus_req && fsm->otg-> in otg_statemachine() 325 fsm->otg->host->b_hnp_enable) in otg_statemachine() 333 if (!fsm->b_conn && fsm->otg->host->b_hnp_enable) in otg_statemachine() [all …]
|
/drivers/usb/host/ |
D | ehci-mv.c | 32 struct usb_phy *otg; member 209 ehci_mv->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); in mv_ehci_probe() 210 if (IS_ERR(ehci_mv->otg)) { in mv_ehci_probe() 211 retval = PTR_ERR(ehci_mv->otg); in mv_ehci_probe() 222 retval = otg_set_host(ehci_mv->otg->otg, &hcd->self); in mv_ehci_probe() 273 if (!IS_ERR_OR_NULL(ehci_mv->otg)) in mv_ehci_remove() 274 otg_set_host(ehci_mv->otg->otg, NULL); in mv_ehci_remove()
|
D | ehci-mxc.c | 132 if (pdata->otg) { in ehci_mxc_drv_probe() 133 pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET; in ehci_mxc_drv_probe() 134 ret = usb_phy_init(pdata->otg); in ehci_mxc_drv_probe() 140 ret = otg_set_vbus(pdata->otg->otg, 1); in ehci_mxc_drv_probe() 183 if (pdata && pdata->otg) in ehci_mxc_drv_remove() 184 usb_phy_shutdown(pdata->otg); in ehci_mxc_drv_remove()
|
/drivers/power/ |
D | axp288_charger.c | 164 } otg; member 431 if (info->otg.id_short) { in axp288_charger_usb_get_property() 443 if (info->otg.id_short) { in axp288_charger_usb_get_property() 681 container_of(work, struct axp288_chrg_info, otg.work); in axp288_charger_otg_evt_worker() 685 ret = axp288_charger_vbus_path_select(info, !info->otg.id_short); in axp288_charger_otg_evt_worker() 694 container_of(nb, struct axp288_chrg_info, otg.id_nb); in axp288_charger_handle_otg_evt() 705 info->otg.id_short = usb_host; in axp288_charger_handle_otg_evt() 706 schedule_work(&info->otg.work); in axp288_charger_handle_otg_evt() 872 INIT_WORK(&info->otg.work, axp288_charger_otg_evt_worker); in axp288_charger_probe() 873 info->otg.id_nb.notifier_call = axp288_charger_handle_otg_evt; in axp288_charger_probe() [all …]
|