/drivers/usb/cdns3/ |
D | core.c | 28 static int cdns_role_start(struct cdns *cdns, enum usb_role role) in cdns_role_start() argument 32 if (WARN_ON(role > USB_ROLE_DEVICE)) in cdns_role_start() 36 cdns->role = role; in cdns_role_start() 39 if (!cdns->roles[role]) in cdns_role_start() 42 if (cdns->roles[role]->state == CDNS_ROLE_STATE_ACTIVE) in cdns_role_start() 46 ret = cdns->roles[role]->start(cdns); in cdns_role_start() 48 cdns->roles[role]->state = CDNS_ROLE_STATE_ACTIVE; in cdns_role_start() 56 enum usb_role role = cdns->role; in cdns_role_stop() local 58 if (WARN_ON(role > USB_ROLE_DEVICE)) in cdns_role_stop() 61 if (cdns->roles[role]->state == CDNS_ROLE_STATE_INACTIVE) in cdns_role_stop() [all …]
|
D | Kconfig | 8 dual-role controller. 9 It supports: dual-role switch, Host-only, and Peripheral-only. 20 Say Y here if your system has a Cadence USB3 dual-role controller. 21 It supports: dual-role switch, Host-only, and Peripheral-only. 89 Say Y here if your system has a Cadence CDNSP dual-role controller. 90 It supports: dual-role switch Host-only, and Peripheral-only.
|
/drivers/usb/dwc2/ |
D | drd.c | 86 static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role) in dwc2_drd_role_sw_set() argument 93 if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_drd_role_sw_set() 94 (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)) in dwc2_drd_role_sw_set() 100 if (role == USB_ROLE_NONE && hsotg->test_mode) { in dwc2_drd_role_sw_set() 122 if (role == USB_ROLE_NONE) { in dwc2_drd_role_sw_set() 125 role = USB_ROLE_HOST; in dwc2_drd_role_sw_set() 127 role = USB_ROLE_DEVICE; in dwc2_drd_role_sw_set() 130 if (role == USB_ROLE_HOST) { in dwc2_drd_role_sw_set() 132 } else if (role == USB_ROLE_DEVICE) { in dwc2_drd_role_sw_set() 152 dwc2_force_mode(hsotg, role == USB_ROLE_HOST); in dwc2_drd_role_sw_set() [all …]
|
/drivers/usb/chipidea/ |
D | ci.h | 215 enum ci_role role; member 266 BUG_ON(ci->role >= CI_ROLE_END || !ci->roles[ci->role]); in ci_role() 267 return ci->roles[ci->role]; in ci_role() 270 static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role) in ci_role_start() argument 274 if (role >= CI_ROLE_END) in ci_role_start() 277 if (!ci->roles[role]) in ci_role_start() 280 ret = ci->roles[role]->start(ci); in ci_role_start() 282 ci->role = role; in ci_role_start() 288 enum ci_role role = ci->role; in ci_role_stop() local 290 if (role == CI_ROLE_END) in ci_role_stop() [all …]
|
D | otg.c | 124 enum ci_role role = hw_read_otgsc(ci, OTGSC_ID) in ci_otg_role() local 128 return role; in ci_otg_role() 170 enum ci_role role; in ci_handle_id_switch() local 173 role = ci_otg_role(ci); in ci_handle_id_switch() 174 if (role != ci->role) { in ci_handle_id_switch() 176 ci_role(ci)->name, ci->roles[role]->name); in ci_handle_id_switch() 178 if (ci->vbus_active && ci->role == CI_ROLE_GADGET) in ci_handle_id_switch() 187 if (role == CI_ROLE_GADGET && in ci_handle_id_switch() 198 ci_role_start(ci, role); in ci_handle_id_switch() 200 if (role == CI_ROLE_GADGET) in ci_handle_id_switch()
|
D | debug.c | 127 if (ci->role != CI_ROLE_GADGET) { in ci_qheads_show() 161 if (ci->role != CI_ROLE_GADGET) { in ci_requests_show() 254 if (ci->role != CI_ROLE_END) in ci_role_show() 265 enum ci_role role; in ci_role_write() local 272 for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++) in ci_role_write() 273 if (ci->roles[role] && in ci_role_write() 274 !strncmp(buf, ci->roles[role]->name, in ci_role_write() 275 strlen(ci->roles[role]->name))) in ci_role_write() 278 if (role == CI_ROLE_END || role == ci->role) in ci_role_write() 284 ret = ci_role_start(ci, role); in ci_role_write()
|
D | core.c | 573 if (ci->role != CI_ROLE_END) in ci_irq_handler() 604 enum usb_role role; in ci_usb_role_switch_get() local 608 role = ci_role_to_usb_role(ci); in ci_usb_role_switch_get() 611 return role; in ci_usb_role_switch_get() 615 enum usb_role role) in ci_usb_role_switch_set() argument 620 enum ci_role ci_role = usb_role_to_ci_role(role); in ci_usb_role_switch_set() 624 (current_role == role)) in ci_usb_role_switch_set() 640 if (ci->wq && role != USB_ROLE_NONE) in ci_usb_role_switch_set() 648 if (role == USB_ROLE_DEVICE) in ci_usb_role_switch_set() 650 else if (role == USB_ROLE_HOST) in ci_usb_role_switch_set() [all …]
|
/drivers/staging/r8188eu/include/ |
D | rtw_p2p.h | 44 void init_wifidirect_info(struct adapter *padapter, enum P2P_ROLE role); 45 int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role); 62 enum P2P_ROLE role) in _rtw_p2p_set_role() argument 64 if (wdinfo->role != role) in _rtw_p2p_set_role() 65 wdinfo->role = role; in _rtw_p2p_set_role() 80 return wdinfo->role; in _rtw_p2p_role() 90 enum P2P_ROLE role) in _rtw_p2p_chk_role() argument 92 return wdinfo->role == role; in _rtw_p2p_chk_role() 98 #define rtw_p2p_set_role(wdinfo, role) _rtw_p2p_set_role(wdinfo, role) argument 104 #define rtw_p2p_chk_role(wdinfo, role) _rtw_p2p_chk_role(wdinfo, role) argument
|
/drivers/usb/typec/ |
D | qcom-pmic-typec.c | 69 enum usb_role role; in qcom_pmic_typec_check_connection() local 82 role = (stat & SNK_SRC_MODE) ? USB_ROLE_HOST : USB_ROLE_DEVICE; in qcom_pmic_typec_check_connection() 83 if (role == USB_ROLE_HOST) in qcom_pmic_typec_check_connection() 88 role = USB_ROLE_NONE; in qcom_pmic_typec_check_connection() 93 usb_role_switch_set_role(qcom_usb->role_sw, role); in qcom_pmic_typec_check_connection() 136 int ret, irq, role; in qcom_pmic_typec_probe() local 168 role = typec_find_port_power_role(buf); in qcom_pmic_typec_probe() 169 if (role < 0) in qcom_pmic_typec_probe() 170 role = TYPEC_PORT_SNK; in qcom_pmic_typec_probe() 172 role = TYPEC_PORT_SNK; in qcom_pmic_typec_probe() [all …]
|
/drivers/usb/roles/ |
D | class.c | 22 enum usb_role role; member 42 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument 51 ret = sw->set(sw, role); in usb_role_switch_set_role() 53 sw->role = role; in usb_role_switch_set_role() 72 enum usb_role role; in usb_role_switch_get_role() local 80 role = sw->get(sw); in usb_role_switch_get_role() 82 role = sw->role; in usb_role_switch_get_role() 86 return role; in usb_role_switch_get_role() 220 const char *usb_role_string(enum usb_role role) in usb_role_string() argument 222 if (role < 0 || role >= ARRAY_SIZE(usb_roles)) in usb_role_string() [all …]
|
D | intel-xhci-usb-role-switch.c | 56 enum usb_role role) in intel_xhci_usb_set_role() argument 84 switch (role) { in intel_xhci_usb_set_role() 116 if (!!(val & HOST_MODE) == (role == USB_ROLE_HOST)) { in intel_xhci_usb_set_role() 134 enum usb_role role; in intel_xhci_usb_get_role() local 142 role = USB_ROLE_HOST; in intel_xhci_usb_get_role() 144 role = USB_ROLE_DEVICE; in intel_xhci_usb_get_role() 146 role = USB_ROLE_NONE; in intel_xhci_usb_get_role() 148 return role; in intel_xhci_usb_get_role()
|
D | Kconfig | 6 USB Role Switch is a device that can select the USB role - host or 7 device - for a USB port (connector). In most cases dual-role capable 22 Driver for the internal USB role switch for switching the USB data 27 be called intel-xhci-usb-role-switch.
|
/drivers/net/ethernet/intel/ice/ |
D | ice_lag.c | 29 if (lag->role != ICE_LAG_UNSET && lag->role != ICE_LAG_BACKUP) { in ice_lag_set_primary() 35 lag->role = ICE_LAG_PRIMARY; in ice_lag_set_primary() 49 if (lag->role != ICE_LAG_UNSET && lag->role != ICE_LAG_PRIMARY) { in ice_lag_set_backup() 55 lag->role = ICE_LAG_BACKUP; in ice_lag_set_backup() 64 const char *name, *peer, *upper, *role, *bonded, *primary; in ice_display_lag_info() local 73 switch (lag->role) { in ice_display_lag_info() 75 role = "NONE"; in ice_display_lag_info() 78 role = "PRIMARY"; in ice_display_lag_info() 81 role = "BACKUP"; in ice_display_lag_info() 84 role = "UNSET"; in ice_display_lag_info() [all …]
|
/drivers/extcon/ |
D | extcon-usbc-cros-ec.c | 152 pd_control.role = USB_PD_CTRL_ROLE_NO_CHANGE; in cros_ec_usb_get_role() 166 return resp.role; in cros_ec_usb_get_role() 188 static const char *cros_ec_usb_role_string(unsigned int role) in cros_ec_usb_role_string() argument 190 return role == DR_NONE ? "DISCONNECTED" : in cros_ec_usb_role_string() 191 (role == DR_HOST ? "DFP" : "UFP"); in cros_ec_usb_role_string() 223 unsigned int role) in cros_ec_usb_power_type_is_wall_wart() argument 251 int role, power_type; in extcon_cros_ec_detect_cable() local 266 role = cros_ec_usb_get_role(info, &polarity); in extcon_cros_ec_detect_cable() 267 if (role < 0) { in extcon_cros_ec_detect_cable() 268 if (role != -ENOTCONN) { in extcon_cros_ec_detect_cable() [all …]
|
D | extcon-axp288.c | 168 enum usb_role role; in axp288_get_id_pin() local 174 role = usb_role_switch_get_role(info->role_sw); in axp288_get_id_pin() 175 return role != USB_ROLE_HOST; in axp288_get_id_pin() 182 enum usb_role role; in axp288_usb_role_work() local 188 role = USB_ROLE_HOST; in axp288_usb_role_work() 190 role = USB_ROLE_DEVICE; in axp288_usb_role_work() 192 role = USB_ROLE_NONE; in axp288_usb_role_work() 194 ret = usb_role_switch_set_role(info->role_sw, role); in axp288_usb_role_work()
|
/drivers/s390/net/ |
D | qeth_l2_sys.c | 28 &card->options.sbp.role, &state); in qeth_bridge_port_role_state_show() 42 switch (card->options.sbp.role) { in qeth_bridge_port_role_state_show() 54 card->options.sbp.role, state); in qeth_bridge_port_role_state_show() 79 enum qeth_sbp_roles role; in qeth_bridge_port_role_store() local 82 role = QETH_SBP_ROLE_PRIMARY; in qeth_bridge_port_role_store() 84 role = QETH_SBP_ROLE_SECONDARY; in qeth_bridge_port_role_store() 86 role = QETH_SBP_ROLE_NONE; in qeth_bridge_port_role_store() 99 rc = qeth_bridgeport_setrole(card, role); in qeth_bridge_port_role_store() 101 card->options.sbp.role = role; in qeth_bridge_port_role_store() 103 card->options.sbp.role = role; in qeth_bridge_port_role_store() [all …]
|
D | qeth_l2.h | 15 enum qeth_sbp_roles *role, 17 int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role); 34 return card->options.sbp.role || in qeth_bridgeport_is_in_use()
|
/drivers/misc/ |
D | hisi_hikey_usb.c | 44 enum usb_role role; member 98 enum usb_role role; in relay_set_role_switch() local 104 switch (hisi_hikey_usb->role) { in relay_set_role_switch() 124 role = hisi_hikey_usb->role; in relay_set_role_switch() 127 usb_role_switch_set_role(sw, role); in relay_set_role_switch() 130 static int hub_usb_role_switch_set(struct usb_role_switch *sw, enum usb_role role) in hub_usb_role_switch_set() argument 138 hisi_hikey_usb->role = role; in hub_usb_role_switch_set()
|
/drivers/usb/typec/mux/ |
D | intel_pmc_mux.c | 129 enum usb_role role; member 273 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_dp() 305 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_tbt() 348 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_usb4() 416 static int pmc_usb_connect(struct pmc_usb_port *port, enum usb_role role) in pmc_usb_connect() argument 418 u8 ufp = role == USB_ROLE_DEVICE ? 1 : 0; in pmc_usb_connect() 426 if (port->role == role || port->role == USB_ROLE_NONE) in pmc_usb_connect() 453 if (port->orientation == TYPEC_ORIENTATION_NONE || port->role == USB_ROLE_NONE) in pmc_usb_mux_set() 459 return pmc_usb_connect(port, port->role); in pmc_usb_mux_set() 474 return pmc_usb_connect(port, port->role); in pmc_usb_mux_set() [all …]
|
/drivers/usb/common/ |
D | usb-conn-gpio.c | 68 enum usb_role role; in usb_conn_detect_cable() local 81 role = USB_ROLE_HOST; in usb_conn_detect_cable() 83 role = USB_ROLE_DEVICE; in usb_conn_detect_cable() 85 role = USB_ROLE_NONE; in usb_conn_detect_cable() 88 usb_role_string(info->last_role), usb_role_string(role), id, vbus); in usb_conn_detect_cable() 90 if (!info->initial_detection && info->last_role == role) { in usb_conn_detect_cable() 91 dev_warn(info->dev, "repeated role: %s\n", usb_role_string(role)); in usb_conn_detect_cable() 100 ret = usb_role_switch_set_role(info->role_sw, role); in usb_conn_detect_cable() 104 if (role == USB_ROLE_HOST && info->vbus) { in usb_conn_detect_cable() 110 info->last_role = role; in usb_conn_detect_cable()
|
/drivers/usb/musb/ |
D | mediatek.c | 50 enum usb_role role; member 65 static int mtk_otg_switch_set(struct mtk_glue *glue, enum usb_role role) in mtk_otg_switch_set() argument 71 if (role == glue->role) in mtk_otg_switch_set() 74 switch (role) { in mtk_otg_switch_set() 79 if (glue->role == USB_ROLE_NONE) in mtk_otg_switch_set() 92 if (glue->role == USB_ROLE_NONE) in mtk_otg_switch_set() 102 if (glue->role != USB_ROLE_NONE) in mtk_otg_switch_set() 111 glue->role = new_role; in mtk_otg_switch_set() 117 static int musb_usb_role_sx_set(struct usb_role_switch *sw, enum usb_role role) in musb_usb_role_sx_set() argument 119 return mtk_otg_switch_set(usb_role_switch_get_drvdata(sw), role); in musb_usb_role_sx_set() [all …]
|
/drivers/block/drbd/ |
D | drbd_state.c | 105 state_change->resource->role[OLD] = in remember_old_state() 167 resource_state_change->role[NEW] = in remember_new_state() 219 OLD_TO_NEW(resource_state_change->role); in copy_old_to_new_state_change() 305 device->state.role != R_SECONDARY) { in conn_all_vols_unconf() 337 enum drbd_role role = R_SECONDARY; in conn_highest_role() local 344 role = max_role(role, device->state.role); in conn_highest_role() 348 return role; in conn_highest_role() 471 ((os.role != R_PRIMARY && ns.role == R_PRIMARY) || in cl_wide_st_chg() 720 drbd_role_str(ns.role), in print_st() 750 if (ns.role != os.role && flags & CS_DC_ROLE) in print_state_change() [all …]
|
/drivers/net/dsa/sja1105/ |
D | sja1105_clocking.c | 152 int port, sja1105_mii_role_t role) in sja1105_cgu_mii_tx_clk_config() argument 176 if (role == XMII_MAC) in sja1105_cgu_mii_tx_clk_config() 273 sja1105_mii_role_t role) in sja1105_mii_clocking_setup() argument 279 (role == XMII_MAC) ? "MAC" : "PHY"); in sja1105_mii_clocking_setup() 283 rc = sja1105_cgu_idiv_config(priv, port, (role == XMII_PHY), 1); in sja1105_mii_clocking_setup() 291 rc = sja1105_cgu_mii_tx_clk_config(priv, port, role); in sja1105_mii_clocking_setup() 302 if (role == XMII_PHY) { in sja1105_mii_clocking_setup() 582 sja1105_mii_role_t role) in sja1105_rgmii_clocking_setup() argument 731 sja1105_mii_role_t role) in sja1105_rmii_clocking_setup() argument 737 (role == XMII_MAC) ? "MAC" : "PHY"); in sja1105_rmii_clocking_setup() [all …]
|
/drivers/media/tuners/ |
D | it913x.c | 18 u8 role:2; member 36 dev_dbg(&pdev->dev, "role %u\n", dev->role); in it913x_init() 154 dev_dbg(&pdev->dev, "role %u\n", dev->role); in it913x_sleep() 166 if (dev->role == IT913X_ROLE_DUAL_MASTER) in it913x_sleep() 171 dev_dbg(&pdev->dev, "role %u, len %d\n", dev->role, len); in it913x_sleep() 219 dev->role, c->frequency, c->bandwidth_hz); in it913x_set_params() 399 dev->role = pdata->role; in it913x_probe() 415 dev_dbg(&pdev->dev, "chip_ver %u, role %u\n", dev->chip_ver, dev->role); in it913x_probe()
|
/drivers/usb/dwc3/ |
D | drd.c | 444 enum usb_role role) in dwc3_usb_role_switch_set() argument 449 switch (role) { in dwc3_usb_role_switch_set() 472 enum usb_role role; in dwc3_usb_role_switch_get() local 477 role = USB_ROLE_HOST; in dwc3_usb_role_switch_get() 480 role = USB_ROLE_DEVICE; in dwc3_usb_role_switch_get() 483 role = dwc->current_otg_role; in dwc3_usb_role_switch_get() 487 role = USB_ROLE_HOST; in dwc3_usb_role_switch_get() 489 role = USB_ROLE_DEVICE; in dwc3_usb_role_switch_get() 493 return role; in dwc3_usb_role_switch_get()
|