| /linux-6.15/include/linux/usb/ |
| H A D | otg.h | 64 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-6.15/drivers/usb/phy/ |
| H A D | phy-tahvo.c | 81 if (tu->phy.otg->gadget) in check_vbus_state() 100 if (tu->phy.otg->gadget) in check_vbus_state() 157 if (tu->phy.otg->gadget) in tahvo_usb_stop_peripheral() 167 if (tu->phy.otg->gadget) in tahvo_usb_power_off() 203 otg->host = NULL; in tahvo_usb_set_host() 209 otg->host = NULL; in tahvo_usb_set_host() 213 otg->host = host; in tahvo_usb_set_host() 283 if (tu->phy.otg->host) { in otg_mode_store() 295 if (tu->phy.otg->gadget) { in otg_mode_store() 329 tu->phy.otg = devm_kzalloc(&pdev->dev, sizeof(*tu->phy.otg), in tahvo_usb_probe() [all …]
|
| H A D | phy-generic.c | 104 struct usb_otg *otg = nop->phy.otg; in nop_gpio_vbus_thread() local 118 otg->gadget); in nop_gpio_vbus_thread() 125 otg->gadget); in nop_gpio_vbus_thread() 170 if (!otg) in nop_set_peripheral() 174 otg->gadget = NULL; in nop_set_peripheral() 178 otg->gadget = gadget; in nop_set_peripheral() 189 if (!otg) in nop_set_host() 193 otg->host = NULL; in nop_set_host() 197 otg->host = host; in nop_set_host() 233 nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg), in usb_phy_gen_create_phy() [all …]
|
| H A D | phy-fsl-usb.c | 460 struct usb_otg *otg = fsm->otg; in fsl_otg_start_host() local 466 if (!otg->host) in fsl_otg_start_host() 527 struct usb_otg *otg = fsm->otg; in fsl_otg_start_gadget() local 530 if (!otg->gadget || !otg->gadget->dev.parent) in fsl_otg_start_gadget() 555 if (!otg) in fsl_otg_set_host() 605 if (!otg) in fsl_otg_set_peripheral() 616 otg->gadget->ops->vbus_draw(otg->gadget, 0); in fsl_otg_set_peripheral() 667 if (!otg || otg->state != OTG_STATE_B_IDLE) in fsl_otg_start_srp() 685 if (!otg) in fsl_otg_start_hnp() 710 struct usb_otg *otg = ((struct fsl_otg *)dev_id)->phy.otg; in fsl_otg_isr() local [all …]
|
| H A D | phy-mv-usb.c | 65 otg->host = host; in mv_otg_set_host() 73 otg->gadget = gadget; in mv_otg_set_peripheral() 195 struct usb_otg *otg = mvotg->phy.otg; in mv_otg_start_host() local 198 if (!otg->host) in mv_otg_start_host() 216 struct usb_otg *otg = mvotg->phy.otg; in mv_otg_start_periphrals() local 218 if (!otg->gadget) in mv_otg_start_periphrals() 403 struct usb_otg *otg; in mv_otg_work() local 410 otg = mvotg->phy.otg; in mv_otg_work() 677 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in mv_otg_probe() 678 if (!otg) in mv_otg_probe() [all …]
|
| H A D | phy-gpio-vbus-usb.c | 98 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 …]
|
| H A D | phy-ulpi.c | 201 struct usb_phy *phy = otg->usb_phy; in ulpi_set_host() 205 otg->host = NULL; in ulpi_set_host() 209 otg->host = host; in ulpi_set_host() 227 struct usb_phy *phy = otg->usb_phy; in ulpi_set_vbus() 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() 255 otg->set_vbus = ulpi_set_vbus; in otg_ulpi_init() 264 struct usb_otg *otg; in devm_otg_ulpi_create() local 270 otg = devm_kzalloc(dev, sizeof(*otg), GFP_KERNEL); in devm_otg_ulpi_create() [all …]
|
| H A D | phy-ab8500-usb.c | 620 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 …]
|
| H A D | phy-ulpi-viewport.c | 29 static int ulpi_viewport_read(struct usb_phy *otg, u32 reg) in ulpi_viewport_read() argument 32 void __iomem *view = otg->io_priv; in ulpi_viewport_read() 47 static int ulpi_viewport_write(struct usb_phy *otg, u32 val, u32 reg) in ulpi_viewport_write() argument 50 void __iomem *view = otg->io_priv; in ulpi_viewport_write()
|
| /linux-6.15/drivers/phy/samsung/ |
| H A D | phy-exynos5250-usb2.c | 199 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-6.15/drivers/phy/ti/ |
| H A D | phy-dm816x-usb.c | 54 otg->host = host; in dm816x_usb_phy_set_host() 56 otg->state = OTG_STATE_UNDEFINED; in dm816x_usb_phy_set_host() 64 otg->gadget = gadget; in dm816x_usb_phy_set_peripheral() 66 otg->state = OTG_STATE_UNDEFINED; in dm816x_usb_phy_set_peripheral() 177 struct usb_otg *otg; in dm816x_usb_phy_probe() local 203 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in dm816x_usb_phy_probe() 204 if (!otg) in dm816x_usb_phy_probe() 210 phy->phy.otg = otg; in dm816x_usb_phy_probe() 212 otg->set_host = dm816x_usb_phy_set_host; in dm816x_usb_phy_probe() 213 otg->set_peripheral = dm816x_usb_phy_set_peripheral; in dm816x_usb_phy_probe() [all …]
|
| H A D | phy-omap-usb2.c | 138 otg->host = host; in omap_usb_set_host() 140 otg->state = OTG_STATE_UNDEFINED; in omap_usb_set_host() 148 otg->gadget = gadget; in omap_usb_set_peripheral() 150 otg->state = OTG_STATE_UNDEFINED; in omap_usb_set_peripheral() 371 struct usb_otg *otg; in omap_usb2_probe() local 385 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in omap_usb2_probe() 386 if (!otg) in omap_usb2_probe() 393 phy->phy.otg = otg; in omap_usb2_probe() 472 otg->set_host = omap_usb_set_host; in omap_usb2_probe() 475 otg->set_vbus = omap_usb_set_vbus; in omap_usb2_probe() [all …]
|
| H A D | phy-twl4030-usb.c | 648 if (!otg) in twl4030_set_peripheral() 651 otg->gadget = gadget; in twl4030_set_peripheral() 653 otg->state = OTG_STATE_UNDEFINED; in twl4030_set_peripheral() 660 if (!otg) in twl4030_set_host() 663 otg->host = host; in twl4030_set_host() 665 otg->state = OTG_STATE_UNDEFINED; in twl4030_set_host() 689 struct usb_otg *otg; in twl4030_usb_probe() local 707 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in twl4030_usb_probe() 708 if (!otg) in twl4030_usb_probe() 719 twl->phy.otg = otg; in twl4030_usb_probe() [all …]
|
| /linux-6.15/drivers/usb/common/ |
| H A D | usb-otg-fsm.c | 74 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-6.15/drivers/usb/musb/ |
| H A D | mpfs.c | 65 musb->xceiv->otg->default_a = 1; in mpfs_musb_set_vbus() 66 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in mpfs_musb_set_vbus() 76 musb->xceiv->otg->default_a = 0; in mpfs_musb_set_vbus() 77 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in mpfs_musb_set_vbus() 86 usb_otg_state_string(musb->xceiv->otg->state), in mpfs_musb_set_vbus() 105 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer() 108 switch (musb->xceiv->otg->state) { in otg_timer() 115 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in otg_timer() 119 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() 148 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() [all …]
|
| H A D | tusb6010.c | 465 switch (musb->xceiv->otg->state) { in musb_do_idle() 561 struct usb_otg *otg = musb->xceiv->otg; in tusb_musb_set_vbus() local 574 otg->default_a = 1; in tusb_musb_set_vbus() 588 switch (musb->xceiv->otg->state) { in tusb_musb_set_vbus() 600 otg->default_a = 1; in tusb_musb_set_vbus() 604 otg->default_a = 0; in tusb_musb_set_vbus() 687 struct usb_otg *otg = musb->xceiv->otg; in tusb_otg_ints() local 695 otg->default_a = default_a; in tusb_otg_ints() 707 if (!otg->default_a) { in tusb_otg_ints() 735 switch (musb->xceiv->otg->state) { in tusb_otg_ints() [all …]
|
| H A D | da8xx.c | 137 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer() 140 switch (musb->xceiv->otg->state) { in otg_timer() 147 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in otg_timer() 150 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() 165 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in otg_timer() 187 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() 206 usb_otg_state_string(musb->xceiv->otg->state)); in da8xx_musb_try_idle() 219 usb_otg_state_string(musb->xceiv->otg->state), in da8xx_musb_try_idle() 305 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in da8xx_musb_interrupt() 311 usb_otg_state_string(musb->xceiv->otg->state), in da8xx_musb_interrupt() [all …]
|
| /linux-6.15/Documentation/devicetree/bindings/phy/ |
| H A D | rockchip,inno-usb2phy.yaml | 60 Phandle to the extcon device providing the cable state for the otg phy. 104 otg-port: 119 - const: otg-mux 121 - const: otg-bvalid 122 - const: otg-id 141 - otg-port 160 otg-port: 176 otg-port: 237 u2phy0_otg: otg-port { 241 interrupt-names = "otg-bvalid", "otg-id", "linestate";
|
| /linux-6.15/Documentation/devicetree/bindings/usb/ |
| H A D | dwc2.yaml | 21 - const: ingenic,jz4775-otg 22 - const: ingenic,jz4780-otg 23 - const: ingenic,x1000-otg 24 - const: ingenic,x1600-otg 25 - const: ingenic,x1700-otg 26 - const: ingenic,x1830-otg 27 - const: ingenic,x2000-otg 59 - const: amcc,dwc-otg 85 - const: otg 135 otg-rev: true [all …]
|
| H A D | usb-drd.yaml | 13 otg-rev: 18 features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be 29 enum: [host, peripheral, otg] 30 default: otg 75 dr_mode = "otg"; 77 otg-rev = <0x0200>;
|
| /linux-6.15/drivers/power/supply/ |
| H A D | axp288_charger.c | 132 } 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() 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() 828 cancel_work_sync(&info->otg.work); in axp288_charger_cancel_work() 888 if (IS_ERR(info->otg.cable)) { in axp288_charger_probe() 892 return PTR_ERR(info->otg.cable); in axp288_charger_probe() 932 if (info->otg.cable) { in axp288_charger_probe() 934 EXTCON_USB_HOST, &info->otg.id_nb); in axp288_charger_probe() [all …]
|
| /linux-6.15/drivers/usb/host/ |
| H A D | ehci-mv.c | 37 struct usb_phy *otg; member 176 ehci_mv->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); in mv_ehci_probe() 177 if (IS_ERR(ehci_mv->otg)) { in mv_ehci_probe() 178 retval = PTR_ERR(ehci_mv->otg); in mv_ehci_probe() 189 retval = otg_set_host(ehci_mv->otg->otg, &hcd->self); in mv_ehci_probe() 245 if (!IS_ERR_OR_NULL(ehci_mv->otg)) in mv_ehci_remove() 246 otg_set_host(ehci_mv->otg->otg, NULL); in mv_ehci_remove()
|
| H A D | ohci-omap.c | 77 otg_start_hnp(hcd->usb_phy->otg); in start_hnp() 80 hcd->usb_phy->otg->state = OTG_STATE_A_SUSPEND; in start_hnp() 95 int need_transceiver = (config->otg != 0); in ohci_omap_reset() 100 if (config->otg) { in ohci_omap_reset() 101 hcd->self.otg_port = config->otg; in ohci_omap_reset() 113 int status = otg_set_host(hcd->usb_phy->otg, in ohci_omap_reset() 137 if (config->otg || config->rwc) { in ohci_omap_reset() 333 (void) otg_set_host(hcd->usb_phy->otg, 0); in ohci_hcd_omap_remove()
|
| /linux-6.15/drivers/phy/motorola/ |
| H A D | phy-cpcap-usb.c | 146 otg->host = host; in cpcap_usb_phy_set_host() 148 otg->state = OTG_STATE_UNDEFINED; in cpcap_usb_phy_set_host() 156 otg->gadget = gadget; in cpcap_usb_phy_set_peripheral() 158 otg->state = OTG_STATE_UNDEFINED; in cpcap_usb_phy_set_peripheral() 613 struct usb_otg *otg; in cpcap_usb_phy_probe() local 624 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in cpcap_usb_phy_probe() 625 if (!otg) in cpcap_usb_phy_probe() 631 ddata->phy.otg = otg; in cpcap_usb_phy_probe() 633 otg->set_host = cpcap_usb_phy_set_host; in cpcap_usb_phy_probe() 634 otg->set_peripheral = cpcap_usb_phy_set_peripheral; in cpcap_usb_phy_probe() [all …]
|
| /linux-6.15/drivers/usb/chipidea/ |
| H A D | otg_fsm.c | 66 if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) { in a_bus_req_store() 355 if (ci->fsm.otg->state == OTG_STATE_B_IDLE) in b_ssend_srp_tmout() 522 if (!fsm->otg->host) in ci_otg_loc_sof() 596 ci->fsm.otg->state < OTG_STATE_A_IDLE) in ci_otg_fsm_work() 601 if (ci->fsm.otg->state == OTG_STATE_A_IDLE) { in ci_otg_fsm_work() 654 switch (ci->fsm.otg->state) { in ci_otg_fsm_event() 802 ci->otg.phy = ci->phy; in ci_hdrc_otg_fsm_init() 804 ci->otg.usb_phy = ci->usb_phy; in ci_hdrc_otg_fsm_init() 806 ci->otg.gadget = &ci->gadget; in ci_hdrc_otg_fsm_init() 807 ci->fsm.otg = &ci->otg; in ci_hdrc_otg_fsm_init() [all …]
|