Home
last modified time | relevance | path

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

12

/Linux-v6.1/drivers/usb/dwc2/
Ddrd.c166 struct usb_role_switch *role_sw; in dwc2_drd_init() local
178 role_sw = usb_role_switch_register(hsotg->dev, &role_sw_desc); in dwc2_drd_init()
179 if (IS_ERR(role_sw)) { in dwc2_drd_init()
180 ret = PTR_ERR(role_sw); in dwc2_drd_init()
186 hsotg->role_sw = role_sw; in dwc2_drd_init()
198 if (hsotg->role_sw && !hsotg->params.external_id_pin_ctl) { in dwc2_drd_suspend()
212 if (hsotg->role_sw) { in dwc2_drd_resume()
214 role = usb_role_switch_get_role(hsotg->role_sw); in dwc2_drd_resume()
236 if (hsotg->role_sw && !hsotg->params.external_id_pin_ctl) { in dwc2_drd_resume()
247 if (hsotg->role_sw) in dwc2_drd_exit()
[all …]
Dplatform.c703 if (!dwc2->role_sw) { in dwc2_resume()
Dcore.h1044 struct usb_role_switch *role_sw; member
/Linux-v6.1/drivers/usb/typec/
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()
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 ret = dev_err_probe(dev, PTR_ERR(qcom_usb->role_sw), in qcom_pmic_typec_probe()
222 usb_role_switch_put(qcom_usb->role_sw); in qcom_pmic_typec_probe()
235 usb_role_switch_set_role(qcom_usb->role_sw, USB_ROLE_NONE); in qcom_pmic_typec_remove()
239 usb_role_switch_put(qcom_usb->role_sw); in qcom_pmic_typec_remove()
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 = dev_err_probe(chip->dev, PTR_ERR(chip->role_sw), in stusb160x_probe()
785 if (chip->role_sw) in stusb160x_probe()
786 usb_role_switch_put(chip->role_sw); in stusb160x_probe()
813 if (chip->role_sw) in stusb160x_remove()
814 usb_role_switch_put(chip->role_sw); in stusb160x_remove()
Drt1719.c89 struct usb_role_switch *role_sw; member
210 usb_role_switch_set_role(data->role_sw, usb_role); in rt1719_set_data_role()
876 data->role_sw = fwnode_usb_role_switch_get(fwnode); in rt1719_probe()
877 if (IS_ERR(data->role_sw)) { in rt1719_probe()
878 ret = PTR_ERR(data->role_sw); in rt1719_probe()
926 usb_role_switch_put(data->role_sw); in rt1719_probe()
938 usb_role_switch_put(data->role_sw); in rt1719_remove()
Danx7411.c245 struct usb_role_switch *role_sw; member
477 if (!ctx->typec.role_sw) in anx7411_set_usb_role()
480 return usb_role_switch_set_role(ctx->typec.role_sw, role); in anx7411_set_usb_role()
1242 ctx->typec.role_sw = usb_role_switch_get(dev); in anx7411_typec_port_probe()
1243 if (IS_ERR(ctx->typec.role_sw)) { in anx7411_typec_port_probe()
1245 ctx->typec.role_sw = NULL; in anx7411_typec_port_probe()
1557 if (plat->typec.role_sw) in anx7411_i2c_remove()
1558 usb_role_switch_put(plat->typec.role_sw); in anx7411_i2c_remove()
/Linux-v6.1/drivers/usb/misc/
Dqcom_eud.c35 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-v6.1/drivers/extcon/
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()
Dextcon-ptn5150.c56 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()
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-v6.1/drivers/usb/cdns3/
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()
Dcore.h113 struct usb_role_switch *role_sw; member
/Linux-v6.1/drivers/usb/roles/
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-v6.1/drivers/usb/common/
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()
214 info->role_sw = usb_role_switch_get(dev); in usb_conn_probe()
215 if (IS_ERR(info->role_sw)) in usb_conn_probe()
216 return dev_err_probe(dev, PTR_ERR(info->role_sw), in usb_conn_probe()
266 usb_role_switch_put(info->role_sw); in usb_conn_probe()
279 usb_role_switch_put(info->role_sw); in usb_conn_remove()
/Linux-v6.1/drivers/usb/musb/
Djz4740.c24 struct usb_role_switch *role_sw; member
119 glue->role_sw = usb_role_switch_register(dev, &role_sw_desc); in jz4740_musb_init()
120 if (IS_ERR(glue->role_sw)) { in jz4740_musb_init()
122 return PTR_ERR(glue->role_sw); in jz4740_musb_init()
140 usb_role_switch_unregister(glue->role_sw); in jz4740_musb_exit()
Dmediatek.c51 struct usb_role_switch *role_sw; member
138 glue->role_sw = usb_role_switch_register(glue->dev, &role_sx_desc); in mtk_otg_switch_init()
140 return PTR_ERR_OR_ZERO(glue->role_sw); in mtk_otg_switch_init()
145 return usb_role_switch_unregister(glue->role_sw); in mtk_otg_switch_exit()
/Linux-v6.1/drivers/usb/dwc3/
Ddrd.c513 dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch); in dwc3_setup_role_switch()
514 if (IS_ERR(dwc->role_sw)) in dwc3_setup_role_switch()
515 return PTR_ERR(dwc->role_sw); in dwc3_setup_role_switch()
522 usb_role_switch_unregister(dwc->role_sw); in dwc3_setup_role_switch()
523 dwc->role_sw = NULL; in dwc3_setup_role_switch()
591 if (dwc->role_sw) in dwc3_drd_exit()
592 usb_role_switch_unregister(dwc->role_sw); in dwc3_drd_exit()
/Linux-v6.1/drivers/usb/mtu3/
Dmtu3_dr.c297 otg_sx->role_sw = usb_role_switch_register(dev, &role_sx_desc); in ssusb_role_sw_register()
298 if (IS_ERR(otg_sx->role_sw)) in ssusb_role_sw_register()
299 return PTR_ERR(otg_sx->role_sw); in ssusb_role_sw_register()
328 usb_role_switch_unregister(otg_sx->role_sw); in ssusb_otg_switch_exit()
Dmtu3.h217 struct usb_role_switch *role_sw; member
/Linux-v6.1/drivers/usb/typec/tipd/
Dcore.c90 struct usb_role_switch *role_sw; member
227 usb_role_switch_set_role(tps->role_sw, role_val); in tps6598x_set_data_role()
774 tps->role_sw = fwnode_usb_role_switch_get(fwnode); in tps6598x_probe()
775 if (IS_ERR(tps->role_sw)) { in tps6598x_probe()
776 ret = PTR_ERR(tps->role_sw); in tps6598x_probe()
852 usb_role_switch_put(tps->role_sw); in tps6598x_probe()
866 usb_role_switch_put(tps->role_sw); in tps6598x_remove()
/Linux-v6.1/drivers/platform/chrome/
Dcros_ec_typec.c61 struct usb_role_switch *role_sw; member
166 port->role_sw = fwnode_usb_role_switch_get(fwnode); in cros_typec_get_switch_handles()
167 if (IS_ERR(port->role_sw)) { in cros_typec_get_switch_handles()
244 usb_role_switch_set_role(port->role_sw, USB_ROLE_NONE); in cros_typec_usb_disconnect_state()
315 usb_role_switch_put(typec->ports[i]->role_sw); in cros_unregister_ports()
632 ret = usb_role_switch_set_role(typec->ports[port_num]->role_sw, in cros_typec_configure_mux()
/Linux-v6.1/drivers/usb/gadget/udc/
Drenesas_usb3.c347 struct usb_role_switch *role_sw; member
679 usb_role_switch_set_role(usb3->role_sw, usb3->role); in renesas_usb3_role_work()
702 if (usb3->role_sw) { in usb3_set_mode_by_role_sw()
2404 enum usb_role cur_role = renesas_usb3_role_switch_get(usb3->role_sw); in handle_ext_role_switch_states()
2458 enum usb_role cur_role = renesas_usb3_role_switch_get(usb3->role_sw); in handle_role_switch_states()
2599 usb_role_switch_unregister(usb3->role_sw); in renesas_usb3_remove()
2910 usb3->role_sw = usb_role_switch_register(&pdev->dev, in renesas_usb3_probe()
2912 if (!IS_ERR(usb3->role_sw)) { in renesas_usb3_probe()
2916 usb_role_switch_unregister(usb3->role_sw); in renesas_usb3_probe()
2917 usb3->role_sw = NULL; in renesas_usb3_probe()
[all …]
/Linux-v6.1/drivers/usb/typec/tcpm/
Dtcpm.c307 struct usb_role_switch *role_sw; member
948 if (port->role_sw) { in tcpm_mux_set()
949 ret = usb_role_switch_set_role(port->role_sw, usb_role); in tcpm_mux_set()
6510 port->role_sw = usb_role_switch_get(port->dev); in tcpm_register_port()
6511 if (IS_ERR(port->role_sw)) { in tcpm_register_port()
6512 err = PTR_ERR(port->role_sw); in tcpm_register_port()
6548 usb_role_switch_put(port->role_sw); in tcpm_register_port()
6575 usb_role_switch_put(port->role_sw); in tcpm_unregister_port()

12