| /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 | 782 if (!dwc2->role_sw) { in dwc2_resume()
|
| H A D | core.h | 1066 struct usb_role_switch *role_sw; member
|
| /linux/drivers/extcon/ |
| H A D | extcon-ptn5150.c | 62 struct usb_role_switch *role_sw; member 133 ret = usb_role_switch_set_role(info->role_sw, usb_role); in ptn5150_check_state() 173 ret = usb_role_switch_set_role(info->role_sw, in ptn5150_irq_work() 251 usb_role_switch_put(info->role_sw); in ptn5150_work_sync_and_put() 354 info->role_sw = usb_role_switch_get(info->dev); in ptn5150_i2c_probe() 355 if (!info->role_sw && connector) in ptn5150_i2c_probe() 356 info->role_sw = fwnode_usb_role_switch_get(connector); in ptn5150_i2c_probe() 357 if (IS_ERR(info->role_sw)) in ptn5150_i2c_probe() 358 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() 485 priv->role_sw = fwnode_usb_role_switch_get(connector); in tusb320_typec_probe() 486 if (IS_ERR(priv->role_sw)) { in tusb320_typec_probe() 487 ret = PTR_ERR(priv->role_sw); in tusb320_typec_probe() 506 usb_role_switch_put(priv->role_sw); in tusb320_typec_remove()
|
| H A D | extcon-intel-cht-wc.c | 107 struct usb_role_switch *role_sw; member 337 ret = usb_role_switch_set_role(ext->role_sw, role); in cht_wc_extcon_pwrsrc_event() 398 ext->role_sw = usb_role_switch_find_by_fwnode(fwnode); in cht_wc_extcon_find_role_sw() 401 return ext->role_sw ? 0 : -EPROBE_DEFER; in cht_wc_extcon_find_role_sw() 408 usb_role_switch_put(ext->role_sw); in cht_wc_extcon_put_role_sw()
|
| /linux/drivers/usb/common/ |
| H A D | usb-conn-gpio.c | 37 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 D | hd3ss3220.c | 55 struct usb_role_switch *role_sw; member 233 usb_role_switch_set_role(hd3ss3220->role_sw, role_state); in hd3ss3220_set_role() 390 hd3ss3220->role_sw = fwnode_usb_role_switch_get(connector); in hd3ss3220_probe() 399 hd3ss3220->role_sw = usb_role_switch_get(hd3ss3220->dev); in hd3ss3220_probe() 402 if (IS_ERR(hd3ss3220->role_sw)) { in hd3ss3220_probe() 403 ret = PTR_ERR(hd3ss3220->role_sw); in hd3ss3220_probe() 515 usb_role_switch_put(hd3ss3220->role_sw); in hd3ss3220_probe() 530 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 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 D | dwc3-apple.c | 97 struct usb_role_switch *role_sw; member 428 appledwc->role_sw = usb_role_switch_register(appledwc->dev, &dwc3_role_switch); in dwc3_apple_setup_role_switch() 429 if (IS_ERR(appledwc->role_sw)) in dwc3_apple_setup_role_switch() 430 return PTR_ERR(appledwc->role_sw); in dwc3_apple_setup_role_switch() 492 usb_role_switch_unregister(appledwc->role_sw); in dwc3_apple_remove()
|
| H A D | core.h | 1267 struct usb_role_switch *role_sw; member
|
| /linux/drivers/usb/typec/tipd/ |
| H A D | core.c | 178 struct usb_role_switch *role_sw; member 340 usb_role_switch_set_role(tps->role_sw, role_val); in tps6598x_set_data_role() 795 enum usb_role old_role = usb_role_switch_get_role(tps->role_sw); in cd321x_update_work() 821 usb_role_switch_set_role(tps->role_sw, USB_ROLE_NONE); in cd321x_update_work() 876 usb_role_switch_set_role(tps->role_sw, new_role); in cd321x_update_work() 1877 tps->role_sw = fwnode_usb_role_switch_get(fwnode); in tps6598x_probe() 1878 if (IS_ERR(tps->role_sw)) { in tps6598x_probe() 1879 ret = PTR_ERR(tps->role_sw); in tps6598x_probe() 1933 usb_role_switch_put(tps->role_sw); in tps6598x_probe() 1960 usb_role_switch_put(tps->role_sw); in tps6598x_remove()
|
| /linux/drivers/platform/chrome/ |
| H A D | cros_ec_typec.c | 269 port->role_sw = fwnode_usb_role_switch_get(fwnode); in cros_typec_get_switch_handles() 270 if (IS_ERR(port->role_sw)) { in cros_typec_get_switch_handles() 271 ret = PTR_ERR(port->role_sw); in cros_typec_get_switch_handles() 351 usb_role_switch_set_role(port->role_sw, USB_ROLE_NONE); in cros_typec_usb_disconnect_state() 422 usb_role_switch_put(typec->ports[i]->role_sw); in cros_unregister_ports() 813 ret = usb_role_switch_set_role(typec->ports[port_num]->role_sw, in cros_typec_configure_mux()
|
| /linux/drivers/usb/mtu3/ |
| H A D | mtu3.h | 224 struct usb_role_switch *role_sw; member
|
| /linux/drivers/usb/typec/tcpm/ |
| H A D | tcpm.c | 469 struct usb_role_switch *role_sw; member 1228 if (port->role_sw) { in tcpm_mux_set() 1229 ret = usb_role_switch_set_role(port->role_sw, usb_role); in tcpm_mux_set() 8924 port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode); in tcpm_register_port() 8925 if (!port->role_sw) in tcpm_register_port() 8926 port->role_sw = usb_role_switch_get(port->dev); in tcpm_register_port() 8927 if (IS_ERR(port->role_sw)) { in tcpm_register_port() 8928 err = PTR_ERR(port->role_sw); in tcpm_register_port() 8967 usb_role_switch_put(port->role_sw); in tcpm_register_port() 8996 usb_role_switch_put(port->role_sw); in tcpm_unregister_port()
|
| /linux/drivers/net/wireless/realtek/rtw89/ |
| H A D | coex.c | 4679 u8 role_sw: 1; member 9116 bt->bcnt[BTC_BCNT_ROLESW] += !!(btinfo.hb1.role_sw && !b->role_sw); in _update_bt_info() 9117 b->role_sw = btinfo.hb1.role_sw; in _update_bt_info()
|
| H A D | core.h | 2233 u8 role_sw: 1; member
|