Home
last modified time | relevance | path

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

/linux/drivers/usb/dwc2/
A Ddrd.c143 struct usb_role_switch *role_sw; in dwc2_drd_init() local
154 role_sw = usb_role_switch_register(hsotg->dev, &role_sw_desc); in dwc2_drd_init()
155 if (IS_ERR(role_sw)) { in dwc2_drd_init()
156 ret = PTR_ERR(role_sw); in dwc2_drd_init()
162 hsotg->role_sw = role_sw; in dwc2_drd_init()
174 if (hsotg->role_sw && !hsotg->params.external_id_pin_ctl) { in dwc2_drd_suspend()
187 if (hsotg->role_sw && !hsotg->params.external_id_pin_ctl) { in dwc2_drd_resume()
198 if (hsotg->role_sw) in dwc2_drd_exit()
199 usb_role_switch_unregister(hsotg->role_sw); in dwc2_drd_exit()
A Dcore.h1067 struct usb_role_switch *role_sw; member
/linux/drivers/usb/typec/
A Dhd3ss3220.c38 struct usb_role_switch *role_sw; member
92 usb_role_switch_set_role(hd3ss3220->role_sw, role_val); in hd3ss3220_dr_set()
106 usb_role_switch_set_role(hd3ss3220->role_sw, role_state); in hd3ss3220_set_role()
177 hd3ss3220->role_sw = fwnode_usb_role_switch_get(connector); in hd3ss3220_probe()
186 hd3ss3220->role_sw = usb_role_switch_get(hd3ss3220->dev); in hd3ss3220_probe()
189 if (IS_ERR(hd3ss3220->role_sw)) { in hd3ss3220_probe()
190 ret = PTR_ERR(hd3ss3220->role_sw); in hd3ss3220_probe()
241 usb_role_switch_put(hd3ss3220->role_sw); in hd3ss3220_probe()
253 usb_role_switch_put(hd3ss3220->role_sw); in hd3ss3220_remove()
A Dqcom-pmic-typec.c40 struct usb_role_switch *role_sw; member
93 usb_role_switch_set_role(qcom_usb->role_sw, role); in qcom_pmic_typec_check_connection()
196 qcom_usb->role_sw = fwnode_usb_role_switch_get(dev_fwnode(qcom_usb->dev)); in qcom_pmic_typec_probe()
197 if (IS_ERR(qcom_usb->role_sw)) { in qcom_pmic_typec_probe()
198 if (PTR_ERR(qcom_usb->role_sw) != -EPROBE_DEFER) in qcom_pmic_typec_probe()
200 ret = PTR_ERR(qcom_usb->role_sw); in qcom_pmic_typec_probe()
223 usb_role_switch_put(qcom_usb->role_sw); in qcom_pmic_typec_probe()
236 usb_role_switch_set_role(qcom_usb->role_sw, USB_ROLE_NONE); in qcom_pmic_typec_remove()
240 usb_role_switch_put(qcom_usb->role_sw); in qcom_pmic_typec_remove()
A Dstusb160x.c163 struct usb_role_switch *role_sw; member
340 usb_role_switch_set_role(chip->role_sw, usb_role); in stusb160x_set_data_role()
751 chip->role_sw = fwnode_usb_role_switch_get(fwnode); in stusb160x_probe()
752 if (IS_ERR(chip->role_sw)) { in stusb160x_probe()
753 ret = PTR_ERR(chip->role_sw); in stusb160x_probe()
788 if (chip->role_sw) in stusb160x_probe()
789 usb_role_switch_put(chip->role_sw); in stusb160x_probe()
816 if (chip->role_sw) in stusb160x_remove()
817 usb_role_switch_put(chip->role_sw); in stusb160x_remove()
/linux/drivers/usb/cdns3/
A Dcore.c303 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()
533 if (cdns->role_sw) { in cdns_resume()
534 cdns->role = cdns_role_get(cdns->role_sw); in cdns_resume()
A Dcore.h113 struct usb_role_switch *role_sw; member
/linux/drivers/extcon/
A Dextcon-axp288.c100 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()
/linux/drivers/usb/common/
A Dusb-conn-gpio.c32 struct usb_role_switch *role_sw; member
97 ret = usb_role_switch_set_role(info->role_sw, role); in usb_conn_detect_cable()
230 info->role_sw = usb_role_switch_get(dev); in usb_conn_probe()
231 if (IS_ERR(info->role_sw)) in usb_conn_probe()
232 return dev_err_probe(dev, PTR_ERR(info->role_sw), in usb_conn_probe()
281 usb_role_switch_put(info->role_sw); in usb_conn_probe()
294 usb_role_switch_put(info->role_sw); in usb_conn_remove()
/linux/drivers/usb/roles/
A Dintel-xhci-usb-role-switch.c46 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/musb/
A Djz4740.c24 struct usb_role_switch *role_sw; member
123 glue->role_sw = usb_role_switch_register(dev, &role_sw_desc); in jz4740_musb_init()
124 if (IS_ERR(glue->role_sw)) { in jz4740_musb_init()
126 return PTR_ERR(glue->role_sw); in jz4740_musb_init()
144 usb_role_switch_unregister(glue->role_sw); in jz4740_musb_exit()
A Dmediatek.c51 struct usb_role_switch *role_sw; member
191 glue->role_sw = usb_role_switch_register(glue->dev, &role_sx_desc); in mtk_otg_switch_init()
193 return PTR_ERR_OR_ZERO(glue->role_sw); in mtk_otg_switch_init()
198 return usb_role_switch_unregister(glue->role_sw); in mtk_otg_switch_exit()
/linux/drivers/usb/mtu3/
A Dmtu3_dr.c299 otg_sx->role_sw = usb_role_switch_register(dev, &role_sx_desc); in ssusb_role_sw_register()
300 if (IS_ERR(otg_sx->role_sw)) in ssusb_role_sw_register()
301 return PTR_ERR(otg_sx->role_sw); in ssusb_role_sw_register()
330 usb_role_switch_unregister(otg_sx->role_sw); in ssusb_otg_switch_exit()
A Dmtu3.h217 struct usb_role_switch *role_sw; member
/linux/drivers/usb/typec/tipd/
A Dcore.c90 struct usb_role_switch *role_sw; member
225 usb_role_switch_set_role(tps->role_sw, role_val); in tps6598x_set_data_role()
782 tps->role_sw = fwnode_usb_role_switch_get(fwnode); in tps6598x_probe()
783 if (IS_ERR(tps->role_sw)) { in tps6598x_probe()
784 ret = PTR_ERR(tps->role_sw); in tps6598x_probe()
855 usb_role_switch_put(tps->role_sw); in tps6598x_probe()
868 usb_role_switch_put(tps->role_sw); in tps6598x_remove()
/linux/drivers/usb/dwc3/
A Ddrd.c558 dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch); in dwc3_setup_role_switch()
559 if (IS_ERR(dwc->role_sw)) in dwc3_setup_role_switch()
560 return PTR_ERR(dwc->role_sw); in dwc3_setup_role_switch()
629 if (dwc->role_sw) in dwc3_drd_exit()
630 usb_role_switch_unregister(dwc->role_sw); in dwc3_drd_exit()
A Dcore.h1153 struct usb_role_switch *role_sw; member
/linux/drivers/platform/chrome/
A Dcros_ec_typec.c56 struct usb_role_switch *role_sw; member
150 port->role_sw = fwnode_usb_role_switch_get(fwnode); in cros_typec_get_switch_handles()
151 if (IS_ERR(port->role_sw)) { in cros_typec_get_switch_handles()
159 usb_role_switch_put(port->role_sw); in cros_typec_get_switch_handles()
213 usb_role_switch_set_role(port->role_sw, USB_ROLE_NONE); in cros_typec_usb_disconnect_state()
266 usb_role_switch_put(typec->ports[i]->role_sw); in cros_unregister_ports()
537 ret = usb_role_switch_set_role(typec->ports[port_num]->role_sw, in cros_typec_configure_mux()
/linux/drivers/usb/gadget/udc/
A Drenesas_usb3.c341 struct usb_role_switch *role_sw; member
672 usb_role_switch_set_role(usb3->role_sw, usb3->role); in renesas_usb3_role_work()
685 if (usb3->role_sw) { in usb3_set_mode_by_role_sw()
2376 enum usb_role cur_role = renesas_usb3_role_switch_get(usb3->role_sw); in handle_ext_role_switch_states()
2428 enum usb_role cur_role = renesas_usb3_role_switch_get(usb3->role_sw); in handle_role_switch_states()
2569 usb_role_switch_unregister(usb3->role_sw); in renesas_usb3_remove()
2835 usb3->role_sw = usb_role_switch_register(&pdev->dev, in renesas_usb3_probe()
2837 if (!IS_ERR(usb3->role_sw)) { in renesas_usb3_probe()
2841 usb_role_switch_unregister(usb3->role_sw); in renesas_usb3_probe()
2842 usb3->role_sw = NULL; in renesas_usb3_probe()
[all …]
/linux/drivers/usb/typec/tcpm/
A Dtcpm.c307 struct usb_role_switch *role_sw; member
940 if (port->role_sw) { in tcpm_mux_set()
941 ret = usb_role_switch_set_role(port->role_sw, usb_role); in tcpm_mux_set()
6391 port->role_sw = usb_role_switch_get(port->dev); in tcpm_register_port()
6392 if (IS_ERR(port->role_sw)) { in tcpm_register_port()
6393 err = PTR_ERR(port->role_sw); in tcpm_register_port()
6421 usb_role_switch_put(port->role_sw); in tcpm_register_port()
6445 usb_role_switch_put(port->role_sw); in tcpm_unregister_port()
/linux/drivers/net/wireless/realtek/rtw89/
A Dcoex.c1836 u8 role_sw: 1; member
4043 cx->cnt_bt[BTC_BCNT_ROLESW] += !!(btinfo.hb1.role_sw && !b->role_sw); in _update_bt_info()
4044 b->role_sw = btinfo.hb1.role_sw; in _update_bt_info()
A Dcore.h1107 u32 role_sw: 1; member

Completed in 81 milliseconds