Home
last modified time | relevance | path

Searched refs:role_sw (Results 1 – 17 of 17) sorted by relevance

/linux/drivers/usb/dwc2/
H A Ddrd.c176 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 Dplatform.c782 if (!dwc2->role_sw) { in dwc2_resume()
H A Dgadget.c3603 if (!hsotg->role_sw || (dwc2_readl(hsotg, GOTGCTL) & GOTGCTL_BSESVLD)) in dwc2_hsotg_core_connect()
/linux/drivers/usb/common/
H A Dusb-conn-gpio.c37 struct usb_role_switch *role_sw; member
105 ret = usb_role_switch_set_role(info->role_sw, role); in usb_conn_detect_cable()
234 info->role_sw = usb_role_switch_get(dev); in usb_conn_probe()
235 if (IS_ERR(info->role_sw)) in usb_conn_probe()
236 return dev_err_probe(dev, PTR_ERR(info->role_sw), in usb_conn_probe()
287 usb_role_switch_put(info->role_sw); in usb_conn_probe()
303 usb_role_switch_put(info->role_sw); in usb_conn_remove()
/linux/drivers/usb/typec/
H A Dhd3ss3220.c55 struct usb_role_switch *role_sw; member
211 usb_role_switch_set_role(hd3ss3220->role_sw, role_state); in hd3ss3220_set_role()
373 hd3ss3220->role_sw = fwnode_usb_role_switch_get(connector); in hd3ss3220_probe()
382 hd3ss3220->role_sw = usb_role_switch_get(hd3ss3220->dev); in hd3ss3220_probe()
385 if (IS_ERR(hd3ss3220->role_sw)) { in hd3ss3220_probe()
386 ret = PTR_ERR(hd3ss3220->role_sw); in hd3ss3220_probe()
498 usb_role_switch_put(hd3ss3220->role_sw); in hd3ss3220_probe()
513 usb_role_switch_put(hd3ss3220->role_sw); in hd3ss3220_remove()
H A Drt1719.c89 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 Danx7411.c246 struct usb_role_switch *role_sw; member
480 if (!ctx->typec.role_sw) in anx7411_set_usb_role()
483 return usb_role_switch_set_role(ctx->typec.role_sw, role); in anx7411_set_usb_role()
1032 if (typecp->role_sw) in anx7411_port_unregister()
1033 usb_role_switch_put(typecp->role_sw); in anx7411_port_unregister()
1258 ctx->typec.role_sw = usb_role_switch_get(dev); in anx7411_typec_port_probe()
1259 if (IS_ERR(ctx->typec.role_sw)) { in anx7411_typec_port_probe()
1261 ctx->typec.role_sw = NULL; in anx7411_typec_port_probe()
1278 if (ctx->typec.role_sw) in anx7411_typec_port_probe()
1279 usb_role_switch_put(ctx->typec.role_sw); in anx7411_typec_port_probe()
/linux/drivers/usb/dwc3/
H A Ddwc3-apple.c97 struct usb_role_switch *role_sw; member
394 appledwc->role_sw = usb_role_switch_register(appledwc->dev, &dwc3_role_switch); in dwc3_apple_setup_role_switch()
395 if (IS_ERR(appledwc->role_sw)) in dwc3_apple_setup_role_switch()
396 return PTR_ERR(appledwc->role_sw); in dwc3_apple_setup_role_switch()
458 usb_role_switch_unregister(appledwc->role_sw); in dwc3_apple_remove()
H A Ddrd.c519 dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch); in dwc3_setup_role_switch()
520 if (IS_ERR(dwc->role_sw)) in dwc3_setup_role_switch()
521 return PTR_ERR(dwc->role_sw); in dwc3_setup_role_switch()
528 usb_role_switch_unregister(dwc->role_sw); in dwc3_setup_role_switch()
529 dwc->role_sw = NULL; in dwc3_setup_role_switch()
596 if (dwc->role_sw) in dwc3_drd_exit()
597 usb_role_switch_unregister(dwc->role_sw); in dwc3_drd_exit()
/linux/drivers/extcon/
H A Dextcon-usbc-tusb320.c85 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 Dextcon-intel-cht-wc.c108 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/typec/tipd/
H A Dcore.c176 struct usb_role_switch *role_sw; member
338 usb_role_switch_set_role(tps->role_sw, role_val); in tps6598x_set_data_role()
756 enum usb_role old_role = usb_role_switch_get_role(tps->role_sw); in cd321x_update_work()
782 usb_role_switch_set_role(tps->role_sw, USB_ROLE_NONE); in cd321x_update_work()
836 usb_role_switch_set_role(tps->role_sw, new_role); in cd321x_update_work()
1821 tps->role_sw = fwnode_usb_role_switch_get(fwnode); in tps6598x_probe()
1822 if (IS_ERR(tps->role_sw)) { in tps6598x_probe()
1823 ret = PTR_ERR(tps->role_sw); in tps6598x_probe()
1876 usb_role_switch_put(tps->role_sw); in tps6598x_probe()
1902 usb_role_switch_put(tps->role_sw); in tps6598x_remove()
/linux/drivers/usb/cdns3/
H A Dcore.h116 struct usb_role_switch *role_sw; member
/linux/drivers/usb/gadget/udc/
H A Drenesas_usb3.c348 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()
2453 enum usb_role cur_role = renesas_usb3_role_switch_get(usb3->role_sw); in handle_ext_role_switch_states()
2521 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/platform/chrome/
H A Dcros_ec_typec.c231 port->role_sw = fwnode_usb_role_switch_get(fwnode); in cros_typec_get_switch_handles()
232 if (IS_ERR(port->role_sw)) { in cros_typec_get_switch_handles()
233 ret = PTR_ERR(port->role_sw); in cros_typec_get_switch_handles()
313 usb_role_switch_set_role(port->role_sw, USB_ROLE_NONE); in cros_typec_usb_disconnect_state()
384 usb_role_switch_put(typec->ports[i]->role_sw); in cros_unregister_ports()
774 ret = usb_role_switch_set_role(typec->ports[port_num]->role_sw, in cros_typec_configure_mux()
/linux/drivers/usb/mtu3/
H A Dmtu3.h224 struct usb_role_switch *role_sw; member
/linux/drivers/usb/typec/tcpm/
H A Dtcpm.c350 struct usb_role_switch *role_sw; member
1095 if (port->role_sw) { in tcpm_mux_set()
1096 ret = usb_role_switch_set_role(port->role_sw, usb_role); in tcpm_mux_set()
7892 port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode); in tcpm_register_port()
7893 if (!port->role_sw) in tcpm_register_port()
7894 port->role_sw = usb_role_switch_get(port->dev); in tcpm_register_port()
7895 if (IS_ERR(port->role_sw)) { in tcpm_register_port()
7896 err = PTR_ERR(port->role_sw); in tcpm_register_port()
7935 usb_role_switch_put(port->role_sw); in tcpm_register_port()
7962 usb_role_switch_put(port->role_sw); in tcpm_unregister_port()