Home
last modified time | relevance | path

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

12345678910>>...22

/linux/include/linux/usb/
A Dotg.h64 otg_start_hnp(struct usb_otg *otg) in otg_start_hnp() argument
66 if (otg && otg->start_hnp) in otg_start_hnp()
67 return otg->start_hnp(otg); in otg_start_hnp()
76 if (otg && otg->set_vbus) in otg_set_vbus()
77 return otg->set_vbus(otg, enabled); in otg_set_vbus()
86 if (otg && otg->set_host) in otg_set_host()
87 return otg->set_host(otg, host); in otg_set_host()
98 if (otg && otg->set_peripheral) in otg_set_peripheral()
99 return otg->set_peripheral(otg, periph); in otg_set_peripheral()
107 if (otg && otg->start_srp) in otg_start_srp()
[all …]
/linux/drivers/usb/phy/
A Dphy-isp1301-omap.c646 struct usb_otg *otg = isp->phy.otg; in omap_otg_irq() local
695 if (!otg->host) in omap_otg_irq()
801 usb_bus_start_enum(otg->host, otg->host->otg_port); in omap_otg_irq()
934 struct usb_otg *otg = isp->phy.otg; in isp_update_otg() local
1275 otg->host = host; in isp1301_set_host()
1278 if (otg->gadget) in isp1301_set_host()
1284 otg->host = host; in isp1301_set_host()
1337 if (otg->host) in isp1301_set_peripheral()
1430 if (otg->default_a && (otg->host == NULL || !otg->host->b_hnp_enable)) in isp1301_start_hnp()
1432 if (!otg->default_a && (otg->gadget == NULL in isp1301_start_hnp()
[all …]
A Dphy-fsl-usb.c459 struct usb_otg *otg = fsm->otg; in fsl_otg_start_host() local
465 if (!otg->host) in fsl_otg_start_host()
526 struct usb_otg *otg = fsm->otg; in fsl_otg_start_gadget() local
529 if (!otg->gadget || !otg->gadget->dev.parent) in fsl_otg_start_gadget()
554 if (!otg) in fsl_otg_set_host()
604 if (!otg) in fsl_otg_set_peripheral()
615 otg->gadget->ops->vbus_draw(otg->gadget, 0); in fsl_otg_set_peripheral()
666 if (!otg || otg->state != OTG_STATE_B_IDLE) in fsl_otg_start_srp()
684 if (!otg) in fsl_otg_start_hnp()
709 struct usb_otg *otg = ((struct fsl_otg *)dev_id)->phy.otg; in fsl_otg_isr() local
[all …]
A Dphy-mv-usb.c64 otg->host = host; in mv_otg_set_host()
72 otg->gadget = gadget; in mv_otg_set_peripheral()
194 struct usb_otg *otg = mvotg->phy.otg; in mv_otg_start_host() local
197 if (!otg->host) in mv_otg_start_host()
215 struct usb_otg *otg = mvotg->phy.otg; in mv_otg_start_periphrals() local
217 if (!otg->gadget) in mv_otg_start_periphrals()
402 struct usb_otg *otg; in mv_otg_work() local
409 otg = mvotg->phy.otg; in mv_otg_work()
680 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in mv_otg_probe()
681 if (!otg) in mv_otg_probe()
[all …]
A Dphy-tahvo.c80 if (tu->phy.otg->gadget) in check_vbus_state()
99 if (tu->phy.otg->gadget) in check_vbus_state()
156 if (tu->phy.otg->gadget) in tahvo_usb_stop_peripheral()
166 if (tu->phy.otg->gadget) in tahvo_usb_power_off()
202 otg->host = NULL; in tahvo_usb_set_host()
208 otg->host = NULL; in tahvo_usb_set_host()
212 otg->host = host; in tahvo_usb_set_host()
282 if (tu->phy.otg->host) { in otg_mode_store()
294 if (tu->phy.otg->gadget) { in otg_mode_store()
328 tu->phy.otg = devm_kzalloc(&pdev->dev, sizeof(*tu->phy.otg), in tahvo_usb_probe()
[all …]
A Dphy-ulpi.c205 otg->host = NULL; in ulpi_set_host()
209 otg->host = host; in ulpi_set_host()
250 phy->otg = otg; in otg_ulpi_init()
253 otg->usb_phy = phy; in otg_ulpi_init()
254 otg->set_host = ulpi_set_host; in otg_ulpi_init()
263 struct usb_otg *otg; in otg_ulpi_create() local
269 otg = kzalloc(sizeof(*otg), GFP_KERNEL); in otg_ulpi_create()
270 if (!otg) { in otg_ulpi_create()
287 struct usb_otg *otg; in devm_otg_ulpi_create() local
293 otg = devm_kzalloc(dev, sizeof(*otg), GFP_KERNEL); in devm_otg_ulpi_create()
[all …]
A Dphy-generic.c104 struct usb_otg *otg = nop->phy.otg; in nop_gpio_vbus_thread() local
121 otg->gadget); in nop_gpio_vbus_thread()
130 otg->gadget); in nop_gpio_vbus_thread()
175 if (!otg) in nop_set_peripheral()
179 otg->gadget = NULL; in nop_set_peripheral()
183 otg->gadget = gadget; in nop_set_peripheral()
194 if (!otg) in nop_set_host()
198 otg->host = NULL; in nop_set_host()
202 otg->host = host; in nop_set_host()
242 nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg), in usb_phy_gen_create_phy()
[all …]
A Dphy-gpio-vbus-usb.c98 if (!gpio_vbus->phy.otg->gadget) in gpio_vbus_work()
126 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
151 struct usb_otg *otg = gpio_vbus->phy.otg; in gpio_vbus_irq() local
155 otg->gadget ? otg->gadget->name : "none"); in gpio_vbus_irq()
157 if (otg->gadget) in gpio_vbus_irq()
177 otg->gadget->name); in gpio_vbus_set_peripheral()
185 usb_gadget_vbus_disconnect(otg->gadget); in gpio_vbus_set_peripheral()
186 otg->state = OTG_STATE_UNDEFINED; in gpio_vbus_set_peripheral()
188 otg->gadget = NULL; in gpio_vbus_set_peripheral()
192 otg->gadget = gadget; in gpio_vbus_set_peripheral()
[all …]
A Dphy-ab8500-usb.c620 if (!ab->phy.otg->host) in ab8500_usb_phy_disable_work()
623 if (!ab->phy.otg->gadget) in ab8500_usb_phy_disable_work()
638 if (!otg) in ab8500_usb_set_peripheral()
641 ab = phy_to_ab(otg->usb_phy); in ab8500_usb_set_peripheral()
662 if (!otg) in ab8500_usb_set_host()
667 ab->phy.otg->host = host; in ab8500_usb_set_host()
872 struct usb_otg *otg; in ab8500_usb_probe() local
888 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in ab8500_usb_probe()
889 if (!otg) in ab8500_usb_probe()
895 ab->phy.otg = otg; in ab8500_usb_probe()
[all …]
A Dphy-jz4770.c107 struct usb_otg otg; member
114 static inline struct jz4770_phy *otg_to_jz4770_phy(struct usb_otg *otg) in otg_to_jz4770_phy() argument
116 return container_of(otg, struct jz4770_phy, otg); in otg_to_jz4770_phy()
124 static int ingenic_usb_phy_set_peripheral(struct usb_otg *otg, in ingenic_usb_phy_set_peripheral() argument
127 struct jz4770_phy *priv = otg_to_jz4770_phy(otg); in ingenic_usb_phy_set_peripheral()
146 struct jz4770_phy *priv = otg_to_jz4770_phy(otg); in ingenic_usb_phy_set_host()
307 priv->phy.otg = &priv->otg; in jz4770_phy_probe()
312 priv->otg.state = OTG_STATE_UNDEFINED; in jz4770_phy_probe()
313 priv->otg.usb_phy = &priv->phy; in jz4770_phy_probe()
314 priv->otg.set_host = ingenic_usb_phy_set_host; in jz4770_phy_probe()
[all …]
/linux/drivers/phy/samsung/
A Dphy-exynos5250-usb2.c199 u32 otg; in exynos5250_power_on() local
214 otg &= ~EXYNOS_5250_USBOTGSYS_FSEL_MASK; in exynos5250_power_on()
220 otg |= EXYNOS_5250_USBOTGSYS_PHY_SW_RST | in exynos5250_power_on()
225 otg &= ~EXYNOS_5250_USBOTGSYS_REFCLKSEL_MASK; in exynos5250_power_on()
226 otg |= EXYNOS_5250_REFCLKSEL_CLKCORE << in exynos5250_power_on()
230 otg &= ~(EXYNOS_5250_USBOTGSYS_PHY_SW_RST | in exynos5250_power_on()
266 otg &= ~EXYNOS_5250_USBOTGSYS_FSEL_MASK; in exynos5250_power_on()
272 otg |= EXYNOS_5250_USBOTGSYS_PHY_SW_RST | in exynos5250_power_on()
278 otg |= EXYNOS_5250_REFCLKSEL_CLKCORE << in exynos5250_power_on()
282 otg &= ~(EXYNOS_5250_USBOTGSYS_PHY_SW_RST | in exynos5250_power_on()
[all …]
/linux/drivers/phy/ti/
A Dphy-dm816x-usb.c64 otg->host = host; in dm816x_usb_phy_set_host()
66 otg->state = OTG_STATE_UNDEFINED; in dm816x_usb_phy_set_host()
74 otg->gadget = gadget; in dm816x_usb_phy_set_peripheral()
76 otg->state = OTG_STATE_UNDEFINED; in dm816x_usb_phy_set_peripheral()
189 struct usb_otg *otg; in dm816x_usb_phy_probe() local
221 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in dm816x_usb_phy_probe()
222 if (!otg) in dm816x_usb_phy_probe()
228 phy->phy.otg = otg; in dm816x_usb_phy_probe()
230 otg->set_host = dm816x_usb_phy_set_host; in dm816x_usb_phy_probe()
231 otg->set_peripheral = dm816x_usb_phy_set_peripheral; in dm816x_usb_phy_probe()
[all …]
A Dphy-omap-usb2.c137 otg->host = host; in omap_usb_set_host()
139 otg->state = OTG_STATE_UNDEFINED; in omap_usb_set_host()
147 otg->gadget = gadget; in omap_usb_set_peripheral()
149 otg->state = OTG_STATE_UNDEFINED; in omap_usb_set_peripheral()
370 struct usb_otg *otg; in omap_usb2_probe() local
388 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in omap_usb2_probe()
389 if (!otg) in omap_usb2_probe()
396 phy->phy.otg = otg; in omap_usb2_probe()
477 otg->set_host = omap_usb_set_host; in omap_usb2_probe()
480 otg->set_vbus = omap_usb_set_vbus; in omap_usb2_probe()
[all …]
A Dphy-twl4030-usb.c647 if (!otg) in twl4030_set_peripheral()
650 otg->gadget = gadget; in twl4030_set_peripheral()
652 otg->state = OTG_STATE_UNDEFINED; in twl4030_set_peripheral()
659 if (!otg) in twl4030_set_host()
662 otg->host = host; in twl4030_set_host()
664 otg->state = OTG_STATE_UNDEFINED; in twl4030_set_host()
688 struct usb_otg *otg; in twl4030_usb_probe() local
706 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in twl4030_usb_probe()
707 if (!otg) in twl4030_usb_probe()
718 twl->phy.otg = otg; in twl4030_usb_probe()
[all …]
/linux/arch/arm/mach-pxa/
A Dpxa3xx-ulpi.c33 struct usb_phy *otg; member
79 static int pxa310_ulpi_read(struct usb_phy *otg, u32 reg) in pxa310_ulpi_read() argument
139 err = usb_phy_init(u2d->otg); in pxa310_start_otg_host_transcvr()
145 err = otg_set_vbus(u2d->otg->otg, 1); in pxa310_start_otg_host_transcvr()
151 err = otg_set_host(u2d->otg->otg, host); in pxa310_start_otg_host_transcvr()
189 otg_set_host(u2d->otg->otg, NULL); in pxa310_stop_otg_hc()
190 otg_set_vbus(u2d->otg->otg, 0); in pxa310_stop_otg_hc()
191 usb_phy_shutdown(u2d->otg); in pxa310_stop_otg_hc()
222 if (!u2d->otg) in pxa310_otg_init()
225 u2d->otg->io_priv = u2d->mmio_base; in pxa310_otg_init()
[all …]
/linux/drivers/usb/musb/
A Dmusb_virthub.c46 musb->xceiv->otg->state = OTG_STATE_A_HOST; in musb_host_finish_resume()
53 struct usb_otg *otg = musb->xceiv->otg; in musb_port_suspend() local
88 switch (musb->xceiv->otg->state) { in musb_port_suspend()
90 musb->xceiv->otg->state = OTG_STATE_A_SUSPEND; in musb_port_suspend()
91 musb->is_active = otg->host->b_hnp_enable; in musb_port_suspend()
99 musb->xceiv->otg->state = OTG_STATE_B_WAIT_ACON; in musb_port_suspend()
100 musb->is_active = otg->host->b_hnp_enable; in musb_port_suspend()
199 struct usb_otg *otg = musb->xceiv->otg; in musb_root_disconnect() local
207 switch (musb->xceiv->otg->state) { in musb_root_disconnect()
209 if (otg->host->b_hnp_enable) { in musb_root_disconnect()
[all …]
A Dtusb6010.c460 switch (musb->xceiv->otg->state) { in musb_do_idle()
556 struct usb_otg *otg = musb->xceiv->otg; in tusb_musb_set_vbus() local
569 otg->default_a = 1; in tusb_musb_set_vbus()
583 switch (musb->xceiv->otg->state) { in tusb_musb_set_vbus()
595 otg->default_a = 1; in tusb_musb_set_vbus()
599 otg->default_a = 0; in tusb_musb_set_vbus()
682 struct usb_otg *otg = musb->xceiv->otg; in tusb_otg_ints() local
690 otg->default_a = default_a; in tusb_otg_ints()
702 if (!otg->default_a) { in tusb_otg_ints()
730 switch (musb->xceiv->otg->state) { in tusb_otg_ints()
[all …]
A Dam35x.c133 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer()
136 switch (musb->xceiv->otg->state) { in otg_timer()
143 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in otg_timer()
146 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer()
151 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in otg_timer()
160 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer()
179 usb_otg_state_string(musb->xceiv->otg->state)); in am35x_musb_try_idle()
192 usb_otg_state_string(musb->xceiv->otg->state), in am35x_musb_try_idle()
272 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in am35x_musb_interrupt()
279 usb_otg_state_string(musb->xceiv->otg->state), in am35x_musb_interrupt()
[all …]
A Dda8xx.c135 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer()
138 switch (musb->xceiv->otg->state) { in otg_timer()
145 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in otg_timer()
148 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer()
163 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in otg_timer()
185 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer()
204 usb_otg_state_string(musb->xceiv->otg->state)); in da8xx_musb_try_idle()
217 usb_otg_state_string(musb->xceiv->otg->state), in da8xx_musb_try_idle()
296 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in da8xx_musb_interrupt()
302 usb_otg_state_string(musb->xceiv->otg->state), in da8xx_musb_interrupt()
[all …]
/linux/drivers/usb/common/
A Dusb-otg-fsm.c74 if (fsm->otg->gadget) in otg_leave_state()
105 if (fsm->otg->gadget) in otg_leave_state()
134 dev_err(fsm->otg->host->controller, in otg_hnp_polling_work()
169 if (!fsm->otg->host->b_hnp_enable) { in otg_hnp_polling_work()
177 fsm->otg->host->b_hnp_enable = 1; in otg_hnp_polling_work()
208 if (fsm->otg->state == new_state) in otg_set_state()
251 usb_bus_start_enum(fsm->otg->host, in otg_set_state()
252 fsm->otg->host->otg_port); in otg_set_state()
322 fsm->otg->state = new_state; in otg_set_state()
334 state = fsm->otg->state; in otg_statemachine()
[all …]
/linux/Documentation/devicetree/bindings/phy/
A Dphy-rockchip-inno-usb2.yaml51 Phandle to the extcon device providing the cable state for the otg phy.
84 otg-port:
99 - const: otg-mux
101 - const: otg-bvalid
102 - const: otg-id
121 - otg-port
144 u2phy0_otg: otg-port {
148 interrupt-names = "otg-bvalid", "otg-id", "linestate";
/linux/drivers/usb/host/
A Dehci-mv.c37 struct usb_phy *otg; member
177 ehci_mv->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); in mv_ehci_probe()
178 if (IS_ERR(ehci_mv->otg)) { in mv_ehci_probe()
179 retval = PTR_ERR(ehci_mv->otg); in mv_ehci_probe()
190 retval = otg_set_host(ehci_mv->otg->otg, &hcd->self); in mv_ehci_probe()
246 if (!IS_ERR_OR_NULL(ehci_mv->otg)) in mv_ehci_remove()
247 otg_set_host(ehci_mv->otg->otg, NULL); in mv_ehci_remove()
/linux/drivers/phy/motorola/
A Dphy-cpcap-usb.c155 otg->host = host; in cpcap_usb_phy_set_host()
157 otg->state = OTG_STATE_UNDEFINED; in cpcap_usb_phy_set_host()
165 otg->gadget = gadget; in cpcap_usb_phy_set_peripheral()
167 otg->state = OTG_STATE_UNDEFINED; in cpcap_usb_phy_set_peripheral()
622 struct usb_otg *otg; in cpcap_usb_phy_probe() local
639 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in cpcap_usb_phy_probe()
640 if (!otg) in cpcap_usb_phy_probe()
646 ddata->phy.otg = otg; in cpcap_usb_phy_probe()
648 otg->set_host = cpcap_usb_phy_set_host; in cpcap_usb_phy_probe()
649 otg->set_peripheral = cpcap_usb_phy_set_peripheral; in cpcap_usb_phy_probe()
[all …]
/linux/drivers/power/supply/
A Daxp288_charger.c132 } otg; member
426 if (info->otg.id_short) { in axp288_charger_usb_get_property()
434 if (info->otg.id_short) { in axp288_charger_usb_get_property()
688 struct extcon_dev *edev = info->otg.cable; in axp288_charger_otg_evt_worker()
698 info->otg.id_short = usb_host; in axp288_charger_otg_evt_worker()
712 schedule_work(&info->otg.work); in axp288_charger_handle_otg_evt()
818 cancel_work_sync(&info->otg.work); in axp288_charger_cancel_work()
859 if (info->otg.cable == NULL) { in axp288_charger_probe()
901 if (info->otg.cable) { in axp288_charger_probe()
903 EXTCON_USB_HOST, &info->otg.id_nb); in axp288_charger_probe()
[all …]
/linux/Documentation/devicetree/bindings/usb/
A Dcdns,usb3.yaml24 - const: otg
42 - const: otg
46 enum: [host, otg, peripheral]
94 reg-names = "otg", "xhci", "dev";
98 interrupt-names = "host", "peripheral", "otg";
100 dr_mode = "otg";

Completed in 66 milliseconds

12345678910>>...22