Home
last modified time | relevance | path

Searched refs:otg (Results 1 – 142 of 142) sorted by relevance

/linux-4.1.27/include/linux/usb/
Dotg.h27 int (*set_host)(struct usb_otg *otg, struct usb_bus *host);
30 int (*set_peripheral)(struct usb_otg *otg,
34 int (*set_vbus)(struct usb_otg *otg, bool enabled);
37 int (*start_srp)(struct usb_otg *otg);
40 int (*start_hnp)(struct usb_otg *otg);
48 otg_start_hnp(struct usb_otg *otg) in otg_start_hnp() argument
50 if (otg && otg->start_hnp) in otg_start_hnp()
51 return otg->start_hnp(otg); in otg_start_hnp()
58 otg_set_vbus(struct usb_otg *otg, bool enabled) in otg_set_vbus() argument
60 if (otg && otg->set_vbus) in otg_set_vbus()
[all …]
Dotg-fsm.h117 struct usb_otg *otg; member
Dphy.h82 struct usb_otg *otg; member
/linux-4.1.27/drivers/usb/phy/
Dphy-isp1301-omap.c237 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 …]
Dphy-tahvo.c84 switch (tu->phy.otg->state) { in check_vbus_state()
87 if (tu->phy.otg->gadget) in check_vbus_state()
88 usb_gadget_vbus_connect(tu->phy.otg->gadget); in check_vbus_state()
89 tu->phy.otg->state = OTG_STATE_B_PERIPHERAL; in check_vbus_state()
97 tu->phy.otg->state = OTG_STATE_A_HOST; in check_vbus_state()
104 switch (tu->phy.otg->state) { in check_vbus_state()
106 if (tu->phy.otg->gadget) in check_vbus_state()
107 usb_gadget_vbus_disconnect(tu->phy.otg->gadget); in check_vbus_state()
108 tu->phy.otg->state = OTG_STATE_B_IDLE; in check_vbus_state()
112 tu->phy.otg->state = OTG_STATE_A_IDLE; in check_vbus_state()
[all …]
Dphy-mv-usb.c57 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 …]
Dphy-generic.c109 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 …]
Dphy-fsl-usb.c264 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 …]
Dphy-gpio-vbus-usb.c107 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 …]
Dphy-msm-usb.c461 struct usb_bus *bus = phy->otg->host; in msm_otg_suspend()
558 struct usb_bus *bus = phy->otg->host; in msm_otg_resume()
666 if (!phy->otg->host) in msm_otg_start_host()
669 hcd = bus_to_hcd(phy->otg->host); in msm_otg_start_host()
700 static int msm_otg_set_host(struct usb_otg *otg, struct usb_bus *host) in msm_otg_set_host() argument
702 struct msm_otg *motg = container_of(otg->usb_phy, struct msm_otg, phy); in msm_otg_set_host()
710 dev_info(otg->usb_phy->dev, "Host mode is not supported\n"); in msm_otg_set_host()
715 if (otg->state == OTG_STATE_A_HOST) { in msm_otg_set_host()
716 pm_runtime_get_sync(otg->usb_phy->dev); in msm_otg_set_host()
717 msm_otg_start_host(otg->usb_phy, 0); in msm_otg_set_host()
[all …]
Dphy-ulpi.c212 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 …]
Dphy-ab8500-usb.c442 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 …]
Dphy-ulpi-viewport.c44 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()
DMakefile16 obj-$(CONFIG_OMAP_OTG) += phy-omap-otg.o
Dphy-fsl-usb.h301 #define SET_OTG_STATE(phy, newstate) ((phy)->otg->state = newstate)
DKconfig110 will be called phy-omap-otg.
/linux-4.1.27/drivers/phy/
Dphy-exynos5250-usb2.c204 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 …]
Dphy-omap-usb2.c61 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 …]
Dphy-dm816x-usb.c62 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 …]
Dphy-twl4030-usb.c609 static int twl4030_set_peripheral(struct usb_otg *otg, in twl4030_set_peripheral() argument
612 if (!otg) in twl4030_set_peripheral()
615 otg->gadget = gadget; in twl4030_set_peripheral()
617 otg->state = OTG_STATE_UNDEFINED; in twl4030_set_peripheral()
622 static int twl4030_set_host(struct usb_otg *otg, struct usb_bus *host) in twl4030_set_host() argument
624 if (!otg) in twl4030_set_host()
627 otg->host = host; in twl4030_set_host()
629 otg->state = OTG_STATE_UNDEFINED; in twl4030_set_host()
652 struct usb_otg *otg; in twl4030_usb_probe() local
670 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in twl4030_usb_probe()
[all …]
/linux-4.1.27/arch/arm/mach-pxa/
Dpxa3xx-ulpi.c36 struct usb_phy *otg; member
82 static int pxa310_ulpi_read(struct usb_phy *otg, u32 reg) in pxa310_ulpi_read() argument
101 static int pxa310_ulpi_write(struct usb_phy *otg, u32 val, u32 reg) in pxa310_ulpi_write() argument
142 err = usb_phy_init(u2d->otg); in pxa310_start_otg_host_transcvr()
148 err = otg_set_vbus(u2d->otg->otg, 1); in pxa310_start_otg_host_transcvr()
154 err = otg_set_host(u2d->otg->otg, host); in pxa310_start_otg_host_transcvr()
192 otg_set_host(u2d->otg->otg, NULL); in pxa310_stop_otg_hc()
193 otg_set_vbus(u2d->otg->otg, 0); in pxa310_stop_otg_hc()
194 usb_phy_shutdown(u2d->otg); in pxa310_stop_otg_hc()
224 u2d->otg = otg_ulpi_create(&pxa310_ulpi_access_ops, ulpi_mode); in pxa310_otg_init()
[all …]
/linux-4.1.27/drivers/usb/musb/
Dmusb_virthub.c72 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
110 switch (musb->xceiv->otg->state) { in musb_port_suspend()
112 musb->xceiv->otg->state = OTG_STATE_A_SUSPEND; in musb_port_suspend()
113 musb->is_active = otg->host->b_hnp_enable; in musb_port_suspend()
121 musb->xceiv->otg->state = OTG_STATE_B_WAIT_ACON; in musb_port_suspend()
122 musb->is_active = otg->host->b_hnp_enable; in musb_port_suspend()
127 usb_otg_state_string(musb->xceiv->otg->state)); in musb_port_suspend()
148 if (musb->xceiv->otg->state == OTG_STATE_B_IDLE) { in musb_port_reset()
219 struct usb_otg *otg = musb->xceiv->otg; in musb_root_disconnect() local
[all …]
Domap2430.c68 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 …]
Dda8xx.c201 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 …]
Dam35x.c152 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 …]
Dtusb6010.c343 if (x->otg->default_a || mA < (musb->min_power << 1)) in tusb_draw_power()
464 switch (musb->xceiv->otg->state) { in musb_do_idle()
470 usb_otg_state_string(musb->xceiv->otg->state)); in musb_do_idle()
523 && (musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON))) { in tusb_musb_try_idle()
525 usb_otg_state_string(musb->xceiv->otg->state)); in tusb_musb_try_idle()
542 usb_otg_state_string(musb->xceiv->otg->state), in tusb_musb_try_idle()
559 struct usb_otg *otg = musb->xceiv->otg; in tusb_musb_set_vbus() local
572 otg->default_a = 1; in tusb_musb_set_vbus()
573 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in tusb_musb_set_vbus()
586 switch (musb->xceiv->otg->state) { in tusb_musb_set_vbus()
[all …]
Ddavinci.c217 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 …]
Dmusb_core.c448 switch (musb->xceiv->otg->state) { in musb_otg_timer_func()
452 musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; in musb_otg_timer_func()
458 usb_otg_state_string(musb->xceiv->otg->state)); in musb_otg_timer_func()
460 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; in musb_otg_timer_func()
464 usb_otg_state_string(musb->xceiv->otg->state)); in musb_otg_timer_func()
479 usb_otg_state_string(musb->xceiv->otg->state)); in musb_hnp_stop()
481 switch (musb->xceiv->otg->state) { in musb_hnp_stop()
485 usb_otg_state_string(musb->xceiv->otg->state)); in musb_hnp_stop()
491 musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; in musb_hnp_stop()
500 usb_otg_state_string(musb->xceiv->otg->state)); in musb_hnp_stop()
[all …]
Dmusb_dsps.c182 musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON)) { in dsps_musb_try_idle()
184 usb_otg_state_string(musb->xceiv->otg->state)); in dsps_musb_try_idle()
204 usb_otg_state_string(musb->xceiv->otg->state), in dsps_musb_try_idle()
229 if (musb->xceiv->otg->state == OTG_STATE_B_IDLE && in dsps_musb_enable()
270 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer()
273 switch (musb->xceiv->otg->state) { in otg_timer()
282 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in otg_timer()
285 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer()
294 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in otg_timer()
357 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VFALL; in dsps_interrupt()
[all …]
Dux500.c59 if (musb->xceiv->otg->state == OTG_STATE_A_IDLE) { in ux500_musb_set_vbus()
78 musb->xceiv->otg->default_a = 1; in ux500_musb_set_vbus()
79 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in ux500_musb_set_vbus()
89 musb->xceiv->otg->default_a = 0; in ux500_musb_set_vbus()
105 usb_otg_state_string(musb->xceiv->otg->state), in ux500_musb_set_vbus()
115 event, usb_otg_state_string(musb->xceiv->otg->state)); in musb_otg_notifications()
130 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in musb_otg_notifications()
Dblackfin.c223 if ((musb->xceiv->otg->state == OTG_STATE_B_IDLE in blackfin_interrupt()
224 || musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON) || in blackfin_interrupt()
243 switch (musb->xceiv->otg->state) { in musb_conn_timer_handler()
257 musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; in musb_conn_timer_handler()
267 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in musb_conn_timer_handler()
283 musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; in musb_conn_timer_handler()
318 usb_otg_state_string(musb->xceiv->otg->state)); in musb_conn_timer_handler()
324 usb_otg_state_string(musb->xceiv->otg->state)); in musb_conn_timer_handler()
345 usb_otg_state_string(musb->xceiv->otg->state), in bfin_musb_set_vbus()
Dmusb_gadget.c1549 switch (musb->xceiv->otg->state) { in musb_gadget_wakeup()
1579 otg_start_srp(musb->xceiv->otg); in musb_gadget_wakeup()
1590 usb_otg_state_string(musb->xceiv->otg->state)); in musb_gadget_wakeup()
1791 musb->xceiv->otg->default_a = 0; in musb_gadget_setup()
1792 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in musb_gadget_setup()
1840 struct usb_otg *otg = musb->xceiv->otg; in musb_gadget_start() local
1857 otg_set_peripheral(otg, &musb->g); in musb_gadget_start()
1858 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in musb_gadget_start()
1904 musb->xceiv->otg->state = OTG_STATE_UNDEFINED; in musb_gadget_stop()
1906 otg_set_peripheral(musb->xceiv->otg, NULL); in musb_gadget_stop()
[all …]
Dmusb_host.c2466 switch (musb->xceiv->otg->state) { in musb_bus_suspend()
2476 musb->xceiv->otg->state = OTG_STATE_A_WAIT_BCON; in musb_bus_suspend()
2484 usb_otg_state_string(musb->xceiv->otg->state)); in musb_bus_suspend()
2679 musb->xceiv->otg->default_a = 1; in musb_host_setup()
2680 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in musb_host_setup()
2682 otg_set_host(musb->xceiv->otg, &hcd->self); in musb_host_setup()
2684 musb->xceiv->otg->host = &hcd->self; in musb_host_setup()
/linux-4.1.27/drivers/usb/host/
Dehci-mv.c32 struct usb_phy *otg; member
211 ehci_mv->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); in mv_ehci_probe()
212 if (IS_ERR(ehci_mv->otg)) { in mv_ehci_probe()
213 retval = PTR_ERR(ehci_mv->otg); in mv_ehci_probe()
224 retval = otg_set_host(ehci_mv->otg->otg, &hcd->self); in mv_ehci_probe()
275 if (!IS_ERR_OR_NULL(ehci_mv->otg)) in mv_ehci_remove()
276 otg_set_host(ehci_mv->otg->otg, NULL); in mv_ehci_remove()
Dehci-mxc.c130 if (pdata->otg) { in ehci_mxc_drv_probe()
131 pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET; in ehci_mxc_drv_probe()
132 ret = usb_phy_init(pdata->otg); in ehci_mxc_drv_probe()
138 ret = otg_set_vbus(pdata->otg->otg, 1); in ehci_mxc_drv_probe()
181 if (pdata && pdata->otg) in ehci_mxc_drv_remove()
182 usb_phy_shutdown(pdata->otg); in ehci_mxc_drv_remove()
Dohci-omap.c183 otg_start_hnp(hcd->usb_phy->otg); in start_hnp()
186 hcd->usb_phy->otg->state = OTG_STATE_A_SUSPEND; in start_hnp()
202 int need_transceiver = (config->otg != 0); in ohci_omap_reset()
207 if (config->otg) { in ohci_omap_reset()
208 hcd->self.otg_port = config->otg; in ohci_omap_reset()
225 int status = otg_set_host(hcd->usb_phy->otg, in ohci_omap_reset()
252 if (config->otg || config->rwc) { in ohci_omap_reset()
403 (void) otg_set_host(hcd->usb_phy->otg, 0); in usb_hcd_omap_remove()
Dehci-tegra.c480 u_phy->otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg), in tegra_ehci_probe()
482 if (!u_phy->otg) { in tegra_ehci_probe()
486 u_phy->otg->host = hcd_to_bus(hcd); in tegra_ehci_probe()
501 otg_set_host(u_phy->otg, &hcd->self); in tegra_ehci_probe()
513 otg_set_host(u_phy->otg, NULL); in tegra_ehci_probe()
529 otg_set_host(hcd->usb_phy->otg, NULL); in tegra_ehci_remove()
Dehci-msm.c122 ret = otg_set_host(phy->otg, &hcd->self); in ehci_msm_probe()
155 otg_set_host(hcd->usb_phy->otg, NULL); in ehci_msm_remove()
Dehci-fsl.c138 retval = otg_set_host(hcd->usb_phy->otg, in usb_hcd_fsl_probe()
179 otg_set_host(hcd->usb_phy->otg, NULL); in usb_hcd_fsl_remove()
Doxu210hp-hcd.c3721 void *base, int irq, int otg) in oxu_create() argument
3730 oxu_writel(base + (otg ? OXU_OTG_CORE_OFFSET : OXU_SPH_CORE_OFFSET), in oxu_create()
3735 otg ? "oxu210hp_otg" : "oxu210hp_sph"); in oxu_create()
3746 oxu->is_otg = otg; in oxu_create()
Dehci-hub.c926 otg_start_hnp(hcd->usb_phy->otg); in ehci_hub_control()
/linux-4.1.27/drivers/usb/common/
Dusb-otg-fsm.c127 if (fsm->otg->state == new_state) in otg_set_state()
130 otg_leave_state(fsm, fsm->otg->state); in otg_set_state()
170 usb_bus_start_enum(fsm->otg->host, in otg_set_state()
171 fsm->otg->host->otg_port); in otg_set_state()
239 fsm->otg->state = new_state; in otg_set_state()
250 state = fsm->otg->state; in otg_statemachine()
265 else if (fsm->b_sess_vld && fsm->otg->gadget) in otg_statemachine()
278 else if (fsm->b_bus_req && fsm->otg-> in otg_statemachine()
324 fsm->otg->host->b_hnp_enable) in otg_statemachine()
332 if (!fsm->b_conn && fsm->otg->host->b_hnp_enable) in otg_statemachine()
[all …]
DMakefile9 obj-$(CONFIG_USB_OTG_FSM) += usb-otg-fsm.o
/linux-4.1.27/arch/arm/mach-imx/
Dmx31moboard-devboard.c161 static int devboard_isp1105_init(struct usb_phy *otg) in devboard_isp1105_init() argument
180 static int devboard_isp1105_set_vbus(struct usb_otg *otg, bool on) in devboard_isp1105_set_vbus() argument
204 phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); in devboard_usbh1_init()
205 if (!phy->otg) { in devboard_usbh1_init()
212 phy->otg->set_vbus = devboard_isp1105_set_vbus; in devboard_usbh1_init()
214 usbh1_pdata.otg = phy; in devboard_usbh1_init()
Dmx31moboard-marxbot.c275 static int marxbot_isp1105_init(struct usb_phy *otg) in marxbot_isp1105_init() argument
294 static int marxbot_isp1105_set_vbus(struct usb_otg *otg, bool on) in marxbot_isp1105_set_vbus() argument
318 phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); in marxbot_usbh1_init()
319 if (!phy->otg) { in marxbot_usbh1_init()
326 phy->otg->set_vbus = marxbot_isp1105_set_vbus; in marxbot_usbh1_init()
328 usbh1_pdata.otg = phy; in marxbot_usbh1_init()
Dmach-pca100.c391 otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in pca100_init()
394 if (otg_pdata.otg) in pca100_init()
401 usbh2_pdata.otg = imx_otg_ulpi_create( in pca100_init()
404 if (usbh2_pdata.otg) in pca100_init()
Dmx31moboard-smartbot.c139 otg_host_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in smartbot_otg_host_init()
141 if (!otg_host_pdata.otg) in smartbot_otg_host_init()
Dmach-armadillo5x0.c545 usbotg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in armadillo5x0_init()
547 if (usbotg_pdata.otg) in armadillo5x0_init()
549 usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in armadillo5x0_init()
551 if (usbh2_pdata.otg) in armadillo5x0_init()
Dmach-mx31lite.c263 usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in mx31lite_init()
265 if (usbh2_pdata.otg) in mx31lite_init()
Dmach-pcm037.c667 otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in pcm037_init()
669 if (otg_pdata.otg) in pcm037_init()
673 usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in pcm037_init()
675 if (usbh2_pdata.otg) in pcm037_init()
Dmach-mx31lilly.c201 usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in lilly1131_usb_init()
203 if (usbh2_pdata.otg) in lilly1131_usb_init()
Dmach-mx31_3ds.c721 otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in mx31_3ds_init()
723 if (otg_pdata.otg) in mx31_3ds_init()
726 usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in mx31_3ds_init()
728 if (usbh2_pdata.otg) in mx31_3ds_init()
Dmach-pcm043.c379 otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in pcm043_init()
381 if (otg_pdata.otg) in pcm043_init()
Dmach-mx27_3ds.c502 otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in mx27pdk_init()
505 if (otg_pdata.otg) in mx27pdk_init()
Dmach-mx31moboard.c432 usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | in moboard_usbh2_init()
434 if (!usbh2_pdata.otg) in moboard_usbh2_init()
/linux-4.1.27/Documentation/devicetree/bindings/usb/
Dmsm-hsusb.txt22 "qcom,usb-otg-ci" for chipsets with ChipIdea 45nm PHY
23 "qcom,usb-otg-snps" for chipsets with Synopsys 28nm PHY
48 - qcom,otg-control: OTG control (VBUS and ID notifications) can be one of
53 - dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
75 compatible = "qcom,usb-otg-snps";
92 qcom,otg-control = <1>;
Ddwc2.txt14 - clock-names: shall be "otg"
21 - dr_mode: shall be one of "host", "peripheral" and "otg"
35 clock-names = "otg";
Dgeneric.txt11 "peripheral" and "otg". In case this attribute isn't
23 dr_mode = "otg";
Dsamsung-hsotg.txt24 - first entry: must be "otg"
36 clock-names = "otg";
Dux500-usb.txt8 or both "otg"
23 dr_mode = "otg";
Dci-hdrc-imx.txt13 - dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
Dfsl-usb.txt27 controllers. Can be "host", "peripheral", or "otg". Default to
66 dr_mode = "otg";
79 dr_mode = "otg";
Dtwlxxxx-usb.txt6 interrupt number is the otg interrupt number that raises ID interrupts when
26 interrupt number is the otg interrupt number that raises ID interrupts
Dnvidia,tegra20-usb-phy.txt64 "host", "peripheral", or "otg". Defaults to "host" if not defined.
67 otg means it can operate as either ("on the go")
71 VBUS control (required for dr_mode == otg, optional for dr_mode == host):
Dexynos-usb.txt18 On Exynos5250, port 0 is USB2.0 otg phy
59 On Exynos5250, port 0 is USB2.0 otg phy
Dam33xx-usb.txt38 - dr_mode: Should be one of "host", "peripheral" or "otg".
108 dr_mode = "otg"
Ddwc3-st.txt37 is "otg", which isn't supported by this SoC. Valid dr_mode values for dwc3-st are either "host"
Dsamsung-usbphy.txt57 clock-names = "xusbxti", "otg";
/linux-4.1.27/drivers/usb/chipidea/
Dotg_fsm.c339 if (ci->fsm.otg->state == OTG_STATE_B_IDLE) in b_ssend_srp_tmout()
564 ci->fsm.otg->state < OTG_STATE_A_IDLE) in ci_otg_fsm_work()
569 if (ci->fsm.otg->state == OTG_STATE_A_IDLE) { in ci_otg_fsm_work()
590 } else if (ci->fsm.otg->state == OTG_STATE_B_IDLE) { in ci_otg_fsm_work()
599 } else if (ci->fsm.otg->state == OTG_STATE_A_HOST) { in ci_otg_fsm_work()
622 switch (ci->fsm.otg->state) { in ci_otg_fsm_event()
770 ci->otg.phy = ci->phy; in ci_hdrc_otg_fsm_init()
772 ci->otg.usb_phy = ci->usb_phy; in ci_hdrc_otg_fsm_init()
774 ci->otg.gadget = &ci->gadget; in ci_hdrc_otg_fsm_init()
775 ci->fsm.otg = &ci->otg; in ci_hdrc_otg_fsm_init()
[all …]
Dhost.c134 struct usb_otg *otg = &ci->otg; in host_start() local
139 otg->host = &hcd->self; in host_start()
DMakefile5 ci_hdrc-y := core.o otg.o
Dci.h209 struct usb_otg otg; member
Dcore.c867 if ((ci->fsm.otg->state == OTG_STATE_A_IDLE) && in ci_otg_fsm_suspend_for_srp()
879 if ((ci->fsm.otg->state == OTG_STATE_A_IDLE) && in ci_otg_fsm_wakeup_by_srp()
Ddebug.c227 usb_otg_state_string(ci->otg.state)); in ci_otg_show()
Dudc.c1739 if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) { in ci_udc_stop_for_otg_fsm()
1742 } else if (ci->fsm.otg->state == OTG_STATE_B_PERIPHERAL) { in ci_udc_stop_for_otg_fsm()
1744 ci->fsm.otg->state = OTG_STATE_UNDEFINED; in ci_udc_stop_for_otg_fsm()
/linux-4.1.27/drivers/power/
Disp1704_charger.c271 if (isp->phy->otg->gadget) in isp1704_charger_work()
272 usb_gadget_connect(isp->phy->otg->gadget); in isp1704_charger_work()
301 if (isp->phy->otg->gadget) in isp1704_charger_work()
302 usb_gadget_disconnect(isp->phy->otg->gadget); in isp1704_charger_work()
493 if (isp->phy->otg->gadget) in isp1704_charger_probe()
494 usb_gadget_disconnect(isp->phy->otg->gadget); in isp1704_charger_probe()
501 !isp->phy->otg->default_a) in isp1704_charger_probe()
/linux-4.1.27/arch/arm/mach-omap1/
Dusb.c87 if (config->otg) in omap_otg_init()
106 if (config->otg) in omap_otg_init()
107 printk(", Mini-AB on usb%d", config->otg - 1); in omap_otg_init()
127 if (config->otg || config->register_dev) { in omap_otg_init()
140 if (config->otg || config->register_host) { in omap_otg_init()
153 if (config->otg) { in omap_otg_init()
Dboard-generic.c45 .otg = 1,
Dboard-nokia770.c154 .otg = 1,
Dboard-h2.c347 .otg = 2,
Dboard-sx1.c289 .otg = 0,
Dboard-innovator.c313 .otg = 2,
Dboard-h3.c367 .otg = 2,
Dboard-htcherald.c386 .otg = 0,
/linux-4.1.27/include/linux/platform_data/
Dusb-ehci-mxc.h9 struct usb_phy *otg; member
Dusb-omap1.h24 u8 otg; /* port number, 1-based: usb1 == 2 */ member
/linux-4.1.27/Documentation/usb/
Dchipidea.txt9 If you want to check some internal variables for otg fsm,
11 can show otg fsm variables and some controller registers value:
12 cat /sys/kernel/debug/ci_hdrc.0/otg
/linux-4.1.27/Documentation/devicetree/bindings/pinctrl/
Dnvidia,tegra124-xusb-padctl.txt59 - otg-0, otg-1, otg-2:
/linux-4.1.27/arch/arm/boot/dts/
Drk3188-radxarock.dts71 vcc_otg: usb-otg-regulator {
77 regulator-name = "otg-vbus";
310 otg_vbus_drv: otg-vbus-drv {
Ddra74x.dtsi71 dr_mode = "otg";
Dimx51-digi-connectcore-jsk.dts49 dr_mode = "otg";
Dimx28-cfa10036.dts46 usb0_otg_cfa10036: otg-10036@0 {
Dimx35-eukrea-mbimxsd35-baseboard.dts161 dr_mode = "otg";
Dtegra30-colibri-eval-v3.dts101 dr_mode = "otg";
Dimx27-pdk.dts118 dr_mode = "otg";
Dimx25-eukrea-mbimxsd25-baseboard.dts183 dr_mode = "otg";
Drk3xxx.dtsi146 clock-names = "otg";
155 clock-names = "otg";
Dimx28-apf28dev.dts71 usb0_otg_apf28dev: otg-apf28dev@0 {
Drk3066a-rayeager.dts141 vcc_otg: usb-otg-regulator {
407 otg_drv: otg-drv {
Drk3288-firefly.dtsi150 vcc_otg_5v: usb-otg-regulator {
418 otg_vbus_drv: otg-vbus-drv {
Dimx27-eukrea-cpuimx27.dtsi96 dr_mode = "otg";
Dimx51-eukrea-mbimxsd51-baseboard.dts285 dr_mode = "otg";
Dimx27-phytec-phycore-som.dtsi319 dr_mode = "otg";
Dimx25-pdk.dts313 dr_mode = "otg";
Dimx6qdl-cubox-i.dtsi90 reg_usbotg_vbus: usb-otg-vbus {
Dtegra114-tn7.dts260 /* Should be changed to "otg" once we have vbus_supply */
Dimx6qdl-hummingboard.dtsi80 reg_usbotg_vbus: usb-otg-vbus {
Dsocfpga.dtsi750 clock-names = "otg";
761 clock-names = "otg";
Dexynos5422-odroidxu3.dts355 dr_mode = "otg";
Dbcm21664.dtsi345 clock-names = "otg";
Dam33xx.dtsi518 dr_mode = "otg";
565 dr_mode = "otg";
Dbcm11351.dtsi412 clock-names = "otg";
Dvexpress-v2m-rs1.dtsi65 port1-otg;
Dvexpress-v2m.dtsi64 port1-otg;
Dimx6dl-riotboard.dts301 dr_mode = "otg";
Dam4372.dtsi866 dr_mode = "otg";
890 dr_mode = "otg";
Dtegra20-seaboard.dts728 dr_mode = "otg";
734 dr_mode = "otg";
Ddra7.dtsi1298 dr_mode = "otg";
1321 dr_mode = "otg";
1344 dr_mode = "otg";
Dimx51-babbage.dts418 dr_mode = "otg";
Drk3288.dtsi436 clock-names = "otg";
448 clock-names = "otg";
Dexynos3250.dtsi278 clock-names = "otg";
Ds5pv210.dtsi427 clock-names = "otg";
Dexynos4415.dtsi276 clock-names = "otg";
Datlas7.dtsi387 dr_mode = "otg";
Dexynos4.dtsi339 clock-names = "otg";
Dste-dbx5x0.dtsi249 dr_mode = "otg";
Dtegra114-roth.dts990 /* Should be changed to "otg" once we have vbus_supply */
/linux-4.1.27/drivers/pinctrl/
Dpinctrl-tegra-xusb.c843 TEGRA124_LANE("otg-0", 0x004, 0, 0x3, 0, otg),
844 TEGRA124_LANE("otg-1", 0x004, 2, 0x3, 0, otg),
845 TEGRA124_LANE("otg-2", 0x004, 4, 0x3, 0, otg),
/linux-4.1.27/arch/powerpc/boot/dts/
Dmpc5121.dtsi304 dr_mode = "otg";
317 dr_mode = "otg";
Dmpc8349emitxgp.dts148 dr_mode = "otg";
Dasp834x-redboot.dts180 dr_mode = "otg";
Dmpc834x_mds.dts166 dr_mode = "otg";
Dcanyonlands.dts181 compatible = "amcc,dwc-otg";
/linux-4.1.27/drivers/usb/gadget/
Dconfigfs.c59 struct usb_otg_descriptor otg; member
1514 gi->otg.bLength = sizeof(struct usb_otg_descriptor); in gadgets_make()
1515 gi->otg.bDescriptorType = USB_DT_OTG; in gadgets_make()
1516 gi->otg.bmAttributes = USB_OTG_SRP | USB_OTG_HNP; in gadgets_make()
/linux-4.1.27/drivers/usb/gadget/udc/
Domap_udc.c1160 retval = otg_start_srp(udc->transceiver->otg); in omap_wakeup()
2078 status = otg_set_peripheral(udc->transceiver->otg, in omap_udc_start()
2117 (void) otg_set_peripheral(udc->transceiver->otg, NULL); in omap_udc_stop()
2770 config->otg ? ", Mini-AB" : ""); in omap_udc_probe()
2800 else if (config->otg) { in omap_udc_probe()
2857 udc->gadget.is_otg = (config->otg != 0); in omap_udc_probe()
Ds3c-hsudc.c1165 ret = otg_set_peripheral(hsudc->transceiver->otg, in s3c_hsudc_start()
1211 (void) otg_set_peripheral(hsudc->transceiver->otg, NULL); in s3c_hsudc_stop()
Dpxa25x_udc.c1269 retval = otg_set_peripheral(dev->transceiver->otg, in pxa25x_udc_start()
1345 (void) otg_set_peripheral(dev->transceiver->otg, NULL); in pxa25x_udc_stop()
Dpxa27x_udc.c1802 retval = otg_set_peripheral(udc->transceiver->otg, in pxa27x_udc_start()
1856 return otg_set_peripheral(udc->transceiver->otg, NULL); in pxa27x_udc_stop()
Dfsl_udc_core.c1961 udc_controller->transceiver->otg, in fsl_udc_start()
1987 otg_set_peripheral(udc_controller->transceiver->otg, NULL); in fsl_udc_stop()
Dmv_udc_core.c1371 retval = otg_set_peripheral(udc->transceiver->otg, in mv_udc_start()
/linux-4.1.27/drivers/usb/dwc2/
Dgadget.c3068 otg_set_peripheral(hsotg->uphy->otg, &hsotg->gadget); in s3c_hsotg_udc_start()
3123 otg_set_peripheral(hsotg->uphy->otg, NULL); in s3c_hsotg_udc_stop()
/linux-4.1.27/
DMAINTAINERS10358 F: drivers/usb/common/usb-otg-fsm.c