/linux/drivers/usb/dwc2/ |
H A D | drd.c | 176 struct usb_role_switch *role_sw; in dwc2_drd_init() local 188 role_sw = usb_role_switch_register(hsotg->dev, &role_sw_desc); in dwc2_drd_init() 189 if (IS_ERR(role_sw)) { in dwc2_drd_init() 190 ret = PTR_ERR(role_sw); in dwc2_drd_init() 196 hsotg->role_sw = role_sw; in dwc2_drd_init() 208 if (hsotg->role_sw && !hsotg->params.external_id_pin_ctl) { in dwc2_drd_suspend() 222 if (hsotg->role_sw) { in dwc2_drd_resume() 224 role = usb_role_switch_get_role(hsotg->role_sw); in dwc2_drd_resume() 246 if (hsotg->role_sw && !hsotg->params.external_id_pin_ctl) { in dwc2_drd_resume() 257 if (hsotg->role_sw) in dwc2_drd_exit() [all …]
|
H A D | platform.c | 734 if (!dwc2->role_sw) { in dwc2_resume()
|
/linux/drivers/usb/typec/ |
H A D | hd3ss3220.c | 39 struct usb_role_switch *role_sw; member 96 usb_role_switch_set_role(hd3ss3220->role_sw, role_val); in hd3ss3220_dr_set() 110 usb_role_switch_set_role(hd3ss3220->role_sw, role_state); in hd3ss3220_set_role() 196 hd3ss3220->role_sw = fwnode_usb_role_switch_get(connector); in hd3ss3220_probe() 205 hd3ss3220->role_sw = usb_role_switch_get(hd3ss3220->dev); in hd3ss3220_probe() 208 if (IS_ERR(hd3ss3220->role_sw)) { in hd3ss3220_probe() 209 ret = PTR_ERR(hd3ss3220->role_sw); in hd3ss3220_probe() 266 usb_role_switch_put(hd3ss3220->role_sw); in hd3ss3220_probe() 281 usb_role_switch_put(hd3ss3220->role_sw); in hd3ss3220_remove()
|
H A D | rt1719.c | 89 struct usb_role_switch *role_sw; member 204 usb_role_switch_set_role(data->role_sw, usb_role); in rt1719_set_data_role() 871 data->role_sw = fwnode_usb_role_switch_get(fwnode); in rt1719_probe() 872 if (IS_ERR(data->role_sw)) { in rt1719_probe() 873 ret = PTR_ERR(data->role_sw); in rt1719_probe() 921 usb_role_switch_put(data->role_sw); in rt1719_probe() 933 usb_role_switch_put(data->role_sw); in rt1719_remove()
|
H A D | anx7411.c | 246 struct usb_role_switch *role_sw; member 478 if (!ctx->typec.role_sw) in anx7411_set_usb_role() 481 return usb_role_switch_set_role(ctx->typec.role_sw, role); in anx7411_set_usb_role() 1243 ctx->typec.role_sw = usb_role_switch_get(dev); in anx7411_typec_port_probe() 1244 if (IS_ERR(ctx->typec.role_sw)) { in anx7411_typec_port_probe() 1246 ctx->typec.role_sw = NULL; in anx7411_typec_port_probe() 1551 if (plat->typec.role_sw) in anx7411_i2c_remove() 1552 usb_role_switch_put(plat->typec.role_sw); in anx7411_i2c_remove()
|
/linux/drivers/usb/misc/ |
H A D | qcom_eud.c | 35 struct usb_role_switch *role_sw; member 51 return usb_role_switch_set_role(priv->role_sw, USB_ROLE_DEVICE); in enable_eud() 158 ret = usb_role_switch_set_role(chip->role_sw, USB_ROLE_DEVICE); in handle_eud_irq_thread() 160 ret = usb_role_switch_set_role(chip->role_sw, USB_ROLE_HOST); in handle_eud_irq_thread() 175 usb_role_switch_put(chip->role_sw); in eud_role_switch_release() 189 chip->role_sw = usb_role_switch_get(&pdev->dev); in eud_probe() 190 if (IS_ERR(chip->role_sw)) in eud_probe() 191 return dev_err_probe(chip->dev, PTR_ERR(chip->role_sw), in eud_probe()
|
/linux/drivers/usb/cdns3/ |
H A D | core.c | 304 if (cdns->role_sw) in cdns_hw_role_switch() 449 cdns->role_sw = usb_role_switch_register(dev, &sw_desc); in cdns_init() 450 if (IS_ERR(cdns->role_sw)) { in cdns_init() 452 return PTR_ERR(cdns->role_sw); in cdns_init() 484 if (cdns->role_sw) in cdns_init() 485 usb_role_switch_unregister(cdns->role_sw); in cdns_init() 500 usb_role_switch_unregister(cdns->role_sw); in cdns_remove() 532 if (cdns->role_sw) { in cdns_resume() 533 cdns->role = cdns_role_get(cdns->role_sw); in cdns_resume()
|
H A D | core.h | 114 struct usb_role_switch *role_sw; member
|
/linux/drivers/extcon/ |
H A D | extcon-axp288.c | 100 struct usb_role_switch *role_sw; member 174 role = usb_role_switch_get_role(info->role_sw); in axp288_get_id_pin() 194 ret = usb_role_switch_set_role(info->role_sw, role); in axp288_usb_role_work() 276 if (info->role_sw && info->vbus_attach != vbus_attach) { in axp288_handle_chrg_det_event() 341 usb_role_switch_put(info->role_sw); in axp288_put_role_sw() 357 info->role_sw = usb_role_switch_find_by_fwnode(fwnode); in axp288_extcon_find_role_sw() 360 return info->role_sw ? 0 : -EPROBE_DEFER; in axp288_extcon_find_role_sw() 388 if (info->role_sw) { in axp288_extcon_probe() 463 if (info->role_sw) { in axp288_extcon_probe()
|
H A D | extcon-ptn5150.c | 56 struct usb_role_switch *role_sw; member 109 ret = usb_role_switch_set_role(info->role_sw, usb_role); in ptn5150_check_state() 149 ret = usb_role_switch_set_role(info->role_sw, in ptn5150_irq_work() 221 usb_role_switch_put(info->role_sw); in ptn5150_work_sync_and_put() 314 info->role_sw = usb_role_switch_get(info->dev); in ptn5150_i2c_probe() 315 if (IS_ERR(info->role_sw)) in ptn5150_i2c_probe() 316 return dev_err_probe(info->dev, PTR_ERR(info->role_sw), in ptn5150_i2c_probe()
|
H A D | extcon-usbc-tusb320.c | 85 struct usb_role_switch *role_sw; member 361 usb_role_switch_set_role(priv->role_sw, usb_role); in tusb320_typec_irq_handler() 487 priv->role_sw = fwnode_usb_role_switch_get(connector); in tusb320_typec_probe() 488 if (IS_ERR(priv->role_sw)) { in tusb320_typec_probe() 489 ret = PTR_ERR(priv->role_sw); in tusb320_typec_probe() 508 usb_role_switch_put(priv->role_sw); in tusb320_typec_remove()
|
H A D | extcon-intel-cht-wc.c | 108 struct usb_role_switch *role_sw; member 338 ret = usb_role_switch_set_role(ext->role_sw, role); in cht_wc_extcon_pwrsrc_event() 399 ext->role_sw = usb_role_switch_find_by_fwnode(fwnode); in cht_wc_extcon_find_role_sw() 402 return ext->role_sw ? 0 : -EPROBE_DEFER; in cht_wc_extcon_find_role_sw() 409 usb_role_switch_put(ext->role_sw); in cht_wc_extcon_put_role_sw()
|
/linux/drivers/usb/roles/ |
H A D | intel-xhci-usb-role-switch.c | 46 struct usb_role_switch *role_sw; member 186 data->role_sw = usb_role_switch_register(dev, &sw_desc); in intel_xhci_usb_probe() 187 if (IS_ERR(data->role_sw)) { in intel_xhci_usb_probe() 189 return PTR_ERR(data->role_sw); in intel_xhci_usb_probe() 204 usb_role_switch_unregister(data->role_sw); in intel_xhci_usb_remove()
|
/linux/drivers/usb/common/ |
H A D | usb-conn-gpio.c | 32 struct usb_role_switch *role_sw; member 100 ret = usb_role_switch_set_role(info->role_sw, role); in usb_conn_detect_cable() 217 info->role_sw = usb_role_switch_get(dev); in usb_conn_probe() 218 if (IS_ERR(info->role_sw)) in usb_conn_probe() 219 return dev_err_probe(dev, PTR_ERR(info->role_sw), in usb_conn_probe() 270 usb_role_switch_put(info->role_sw); in usb_conn_probe() 283 usb_role_switch_put(info->role_sw); in usb_conn_remove()
|
/linux/drivers/usb/musb/ |
H A D | jz4740.c | 25 struct usb_role_switch *role_sw; member 152 glue->role_sw = usb_role_switch_register(dev, &role_sw_desc); in jz4740_musb_init() 153 if (IS_ERR(glue->role_sw)) { in jz4740_musb_init() 155 err = PTR_ERR(glue->role_sw); in jz4740_musb_init() 182 usb_role_switch_unregister(glue->role_sw); in jz4740_musb_exit()
|
H A D | mediatek.c | 52 struct usb_role_switch *role_sw; member 139 glue->role_sw = usb_role_switch_register(glue->dev, &role_sx_desc); in mtk_otg_switch_init() 141 return PTR_ERR_OR_ZERO(glue->role_sw); in mtk_otg_switch_init() 146 return usb_role_switch_unregister(glue->role_sw); in mtk_otg_switch_exit()
|
/linux/drivers/usb/mtu3/ |
H A D | mtu3_dr.c | 298 otg_sx->role_sw = usb_role_switch_register(dev, &role_sx_desc); in ssusb_role_sw_register() 299 if (IS_ERR(otg_sx->role_sw)) in ssusb_role_sw_register() 300 return PTR_ERR(otg_sx->role_sw); in ssusb_role_sw_register() 329 usb_role_switch_unregister(otg_sx->role_sw); in ssusb_otg_switch_exit()
|
H A D | mtu3.h | 218 struct usb_role_switch *role_sw; member
|
/linux/drivers/usb/dwc3/ |
H A D | dwc3-rtk.c | 88 if (!rtk->dwc->role_sw) in switch_dwc3_role() 91 usb_role_switch_set_role(rtk->dwc->role_sw, role); in switch_dwc3_role() 100 if (rtk->dwc && rtk->dwc->role_sw) in dwc3_rtk_get_role() 101 role = usb_role_switch_get_role(rtk->dwc->role_sw); in dwc3_rtk_get_role()
|
H A D | core.h | 1226 struct usb_role_switch *role_sw; member
|
/linux/drivers/platform/chrome/ |
H A D | cros_ec_typec.h | 61 struct usb_role_switch *role_sw; member
|
H A D | cros_ec_typec.c | 120 port->role_sw = fwnode_usb_role_switch_get(fwnode); in cros_typec_get_switch_handles() 121 if (IS_ERR(port->role_sw)) { in cros_typec_get_switch_handles() 122 ret = PTR_ERR(port->role_sw); in cros_typec_get_switch_handles() 202 usb_role_switch_set_role(port->role_sw, USB_ROLE_NONE); in cros_typec_usb_disconnect_state() 273 usb_role_switch_put(typec->ports[i]->role_sw); in cros_unregister_ports() 652 ret = usb_role_switch_set_role(typec->ports[port_num]->role_sw, in cros_typec_configure_mux()
|
/linux/drivers/usb/typec/tipd/ |
H A D | core.c | 133 struct usb_role_switch *role_sw; member 265 usb_role_switch_set_role(tps->role_sw, role_val); in tps6598x_set_data_role() 1389 tps->role_sw = fwnode_usb_role_switch_get(fwnode); in tps6598x_probe() 1390 if (IS_ERR(tps->role_sw)) { in tps6598x_probe() 1391 ret = PTR_ERR(tps->role_sw); in tps6598x_probe() 1445 usb_role_switch_put(tps->role_sw); in tps6598x_probe() 1468 usb_role_switch_put(tps->role_sw); in tps6598x_remove()
|
/linux/drivers/usb/gadget/udc/ |
H A D | renesas_usb3.c | 348 struct usb_role_switch *role_sw; member 720 usb_role_switch_set_role(usb3->role_sw, usb3->role); in renesas_usb3_role_work() 743 if (usb3->role_sw) { in usb3_set_mode_by_role_sw() 2454 enum usb_role cur_role = renesas_usb3_role_switch_get(usb3->role_sw); in handle_ext_role_switch_states() 2522 enum usb_role cur_role = renesas_usb3_role_switch_get(usb3->role_sw); in handle_role_switch_states() 2664 usb_role_switch_unregister(usb3->role_sw); in renesas_usb3_remove() 2941 usb3->role_sw = usb_role_switch_register(&pdev->dev, in renesas_usb3_probe() 2943 if (!IS_ERR(usb3->role_sw)) { in renesas_usb3_probe() 2947 usb_role_switch_unregister(usb3->role_sw); in renesas_usb3_probe() 2948 usb3->role_sw = NULL; in renesas_usb3_probe() [all …]
|
/linux/drivers/usb/typec/tcpm/ |
H A D | tcpm.c | 323 struct usb_role_switch *role_sw; member 1039 if (port->role_sw) { in tcpm_mux_set() 1040 ret = usb_role_switch_set_role(port->role_sw, usb_role); in tcpm_mux_set() 7628 port->role_sw = usb_role_switch_get(port->dev); in tcpm_register_port() 7629 if (!port->role_sw) in tcpm_register_port() 7630 port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode); in tcpm_register_port() 7631 if (IS_ERR(port->role_sw)) { in tcpm_register_port() 7632 err = PTR_ERR(port->role_sw); in tcpm_register_port() 7671 usb_role_switch_put(port->role_sw); in tcpm_register_port() 7698 usb_role_switch_put(port->role_sw); in tcpm_unregister_port()
|