/Linux-v5.15/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 …]
|
/Linux-v5.15/drivers/staging/r8188eu/include/ |
D | rtw_p2p.h | 45 void init_wifidirect_info(struct adapter *padapter, enum P2P_ROLE role); 46 int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role); 63 enum P2P_ROLE role) in _rtw_p2p_set_role() argument 65 if (wdinfo->role != role) in _rtw_p2p_set_role() 66 wdinfo->role = role; in _rtw_p2p_set_role() 81 return wdinfo->role; in _rtw_p2p_role() 91 enum P2P_ROLE role) in _rtw_p2p_chk_role() argument 93 return wdinfo->role == role; in _rtw_p2p_chk_role() 99 #define rtw_p2p_set_role(wdinfo, role) _rtw_p2p_set_role(wdinfo, role) argument 105 #define rtw_p2p_chk_role(wdinfo, role) _rtw_p2p_chk_role(wdinfo, role) argument
|
/Linux-v5.15/drivers/usb/chipidea/ |
D | ci.h | 213 enum ci_role role; member 262 BUG_ON(ci->role >= CI_ROLE_END || !ci->roles[ci->role]); in ci_role() 263 return ci->roles[ci->role]; in ci_role() 266 static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role) in ci_role_start() argument 270 if (role >= CI_ROLE_END) in ci_role_start() 273 if (!ci->roles[role]) in ci_role_start() 276 ret = ci->roles[role]->start(ci); in ci_role_start() 278 ci->role = role; in ci_role_start() 284 enum ci_role role = ci->role; in ci_role_stop() local 286 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 = ci_otg_role(ci); in ci_handle_id_switch() local 172 if (role != ci->role) { in ci_handle_id_switch() 174 ci_role(ci)->name, ci->roles[role]->name); in ci_handle_id_switch() 176 if (ci->vbus_active && ci->role == CI_ROLE_GADGET) in ci_handle_id_switch() 185 if (role == CI_ROLE_GADGET && in ci_handle_id_switch() 196 ci_role_start(ci, role); in ci_handle_id_switch() 198 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()
|
/Linux-v5.15/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 …]
|
/Linux-v5.15/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() 217 const char *usb_role_string(enum usb_role role) in usb_role_string() argument 219 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()
|
/Linux-v5.15/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, *master; 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 …]
|
/Linux-v5.15/drivers/usb/dwc2/ |
D | drd.c | 69 static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role) in dwc2_drd_role_sw_set() argument 76 if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_drd_role_sw_set() 77 (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)) in dwc2_drd_role_sw_set() 83 if (role == USB_ROLE_NONE && hsotg->test_mode) { in dwc2_drd_role_sw_set() 91 if (role == USB_ROLE_HOST) { in dwc2_drd_role_sw_set() 93 } else if (role == USB_ROLE_DEVICE) { in dwc2_drd_role_sw_set() 111 dwc2_force_mode(hsotg, role == USB_ROLE_HOST); in dwc2_drd_role_sw_set() 114 role == USB_ROLE_NONE ? "No" : in dwc2_drd_role_sw_set() 115 role == USB_ROLE_HOST ? "A" : "B"); in dwc2_drd_role_sw_set()
|
/Linux-v5.15/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 …]
|
/Linux-v5.15/net/bridge/ |
D | br_mrp_switchdev.c | 66 enum br_mrp_ring_role_type role) in br_mrp_switchdev_set_ring_role() argument 71 .ring_role = role, in br_mrp_switchdev_set_ring_role() 82 role != BR_MRP_RING_ROLE_DISABLED); in br_mrp_switchdev_set_ring_role() 90 if (role != BR_MRP_RING_ROLE_DISABLED) in br_mrp_switchdev_set_ring_role() 142 enum br_mrp_in_role_type role) in br_mrp_switchdev_set_in_role() argument 147 .in_role = role, in br_mrp_switchdev_set_in_role() 160 role != BR_MRP_IN_ROLE_DISABLED); in br_mrp_switchdev_set_in_role() 168 if (role != BR_MRP_IN_ROLE_DISABLED) in br_mrp_switchdev_set_in_role() 229 enum br_mrp_port_role_type role) in br_mrp_port_switchdev_set_role() argument 234 .u.mrp_port_role = role, in br_mrp_port_switchdev_set_role()
|
D | br_mrp_netlink.c | 109 enum br_mrp_port_role_type role; in br_mrp_port_role_parse() local 122 role = nla_get_u32(tb[IFLA_BRIDGE_MRP_PORT_ROLE_ROLE]); in br_mrp_port_role_parse() 124 return br_mrp_set_port_role(p, role); in br_mrp_port_role_parse() 172 struct br_mrp_ring_role role; in br_mrp_ring_role_parse() local 187 memset(&role, 0x0, sizeof(role)); in br_mrp_ring_role_parse() 189 role.ring_id = nla_get_u32(tb[IFLA_BRIDGE_MRP_RING_ROLE_RING_ID]); in br_mrp_ring_role_parse() 190 role.ring_role = nla_get_u32(tb[IFLA_BRIDGE_MRP_RING_ROLE_ROLE]); in br_mrp_ring_role_parse() 192 return br_mrp_set_ring_role(br, &role); in br_mrp_ring_role_parse() 288 struct br_mrp_in_role role; in br_mrp_in_role_parse() local 305 memset(&role, 0x0, sizeof(role)); in br_mrp_in_role_parse() [all …]
|
/Linux-v5.15/drivers/misc/ |
D | hisi_hikey_usb.c | 45 enum usb_role role; member 102 enum usb_role role; in relay_set_role_switch() local 108 switch (hisi_hikey_usb->role) { in relay_set_role_switch() 128 role = hisi_hikey_usb->role; in relay_set_role_switch() 131 usb_role_switch_set_role(sw, role); in relay_set_role_switch() 134 static int hub_usb_role_switch_set(struct usb_role_switch *sw, enum usb_role role) in hub_usb_role_switch_set() argument 142 hisi_hikey_usb->role = role; in hub_usb_role_switch_set()
|
/Linux-v5.15/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 …]
|
/Linux-v5.15/arch/x86/kvm/mmu/ |
D | mmutrace.h | 14 __field(__u32, role) \ 21 __entry->role = sp->role.word; \ 30 union kvm_mmu_page_role role; \ 32 role.word = __entry->role; \ 37 __entry->gfn, role.level, \ 38 role.gpte_is_8_bytes ? 8 : 4, \ 39 role.quadrant, \ 40 role.direct ? " direct" : "", \ 41 access_str[role.access], \ 42 role.invalid ? " invalid" : "", \ [all …]
|
D | mmu.c | 606 int level = sptep_to_sp(sptep)->role.level; in mmu_spte_clear_track_bits() 772 if (!sp->role.direct) in kvm_mmu_page_get_gfn() 775 return sp->gfn + (index << ((sp->role.level - 1) * PT64_LEVEL_BITS)); in kvm_mmu_page_get_gfn() 780 if (!sp->role.direct) { in kvm_mmu_page_set_gfn() 836 slots = kvm_memslots_for_spte_role(kvm, sp->role); in account_shadowed() 840 if (sp->role.level > PG_LEVEL_4K) in account_shadowed() 866 slots = kvm_memslots_for_spte_role(kvm, sp->role); in unaccount_shadowed() 868 if (sp->role.level > PG_LEVEL_4K) in unaccount_shadowed() 1083 rmap_head = gfn_to_rmap(gfn, sp->role.level, slot); in rmap_add() 1104 slots = kvm_memslots_for_spte_role(kvm, sp->role); in rmap_remove() [all …]
|
/Linux-v5.15/scripts/ |
D | get_maintainer.pl | 1269 my $role = "unknown"; 1278 $role = $pvalue; 1283 $role = lc($role); 1284 if ($role eq "supported") { 1285 $role = "supporter"; 1286 } elsif ($role eq "maintained") { 1287 $role = "maintainer"; 1288 } elsif ($role eq "odd fixes") { 1289 $role = "odd fixer"; 1290 } elsif ($role eq "orphan") { [all …]
|
/Linux-v5.15/Documentation/ABI/testing/ |
D | sysfs-platform-chipidea-usb2 | 1 What: /sys/bus/platform/devices/ci_hdrc.0/role 6 current controller role. 8 It will do role switch when write "gadget" or "host" to it. 9 Only controller at dual-role configuration supports writing.
|
/Linux-v5.15/include/linux/usb/ |
D | role.h | 17 enum usb_role role); 52 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role); 68 const char *usb_role_string(enum usb_role role); 71 enum usb_role role) in usb_role_switch_set_role() argument 113 static inline const char *usb_role_string(enum usb_role role) in usb_role_string() argument
|
D | typec.h | 218 int (*try_role)(struct typec_port *port, int role); 219 int (*dr_set)(struct typec_port *port, enum typec_data_role role); 220 int (*pr_set)(struct typec_port *port, enum typec_role role); 221 int (*vconn_set)(struct typec_port *port, enum typec_role role); 286 void typec_set_data_role(struct typec_port *port, enum typec_data_role role); 287 void typec_set_pwr_role(struct typec_port *port, enum typec_role role); 288 void typec_set_vconn_role(struct typec_port *port, enum typec_role role);
|
/Linux-v5.15/net/netfilter/ |
D | nf_conntrack_proto_dccp.c | 409 ct->proto.dccp.role[IP_CT_DIR_ORIGINAL] = CT_DCCP_ROLE_CLIENT; in dccp_new() 410 ct->proto.dccp.role[IP_CT_DIR_REPLY] = CT_DCCP_ROLE_SERVER; in dccp_new() 480 enum ct_dccp_roles role; in nf_conntrack_dccp_packet() local 503 role = ct->proto.dccp.role[dir]; in nf_conntrack_dccp_packet() 505 new_state = dccp_state_table[role][type][old_state]; in nf_conntrack_dccp_packet() 510 role == CT_DCCP_ROLE_SERVER) { in nf_conntrack_dccp_packet() 513 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_CLIENT; in nf_conntrack_dccp_packet() 514 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_SERVER; in nf_conntrack_dccp_packet() 536 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_CLIENT; in nf_conntrack_dccp_packet() 537 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_SERVER; in nf_conntrack_dccp_packet() [all …]
|
/Linux-v5.15/tools/lib/traceevent/plugins/ |
D | plugin_kvm.c | 385 union kvm_mmu_page_role role; in kvm_mmu_print_role() local 390 role.word = (int)val; in kvm_mmu_print_role() 400 role.level, in kvm_mmu_print_role() 401 role.quadrant, in kvm_mmu_print_role() 402 role.direct ? " direct" : "", in kvm_mmu_print_role() 403 access_str[role.access], in kvm_mmu_print_role() 404 role.invalid ? " invalid" : "", in kvm_mmu_print_role() 405 role.cr4_pae ? "" : "!", in kvm_mmu_print_role() 406 role.efer_nx ? "" : "!", in kvm_mmu_print_role() 407 role.cr0_wp ? "" : "!", in kvm_mmu_print_role() [all …]
|
/Linux-v5.15/drivers/usb/common/ |
D | usb-conn-gpio.c | 67 enum usb_role role; in usb_conn_detect_cable() local 80 role = USB_ROLE_HOST; in usb_conn_detect_cable() 82 role = USB_ROLE_DEVICE; in usb_conn_detect_cable() 84 role = USB_ROLE_NONE; in usb_conn_detect_cable() 87 usb_role_string(info->last_role), usb_role_string(role), id, vbus); in usb_conn_detect_cable() 89 if (info->last_role == role) { in usb_conn_detect_cable() 90 dev_warn(info->dev, "repeated role: %s\n", usb_role_string(role)); in usb_conn_detect_cable() 97 ret = usb_role_switch_set_role(info->role_sw, role); in usb_conn_detect_cable() 101 if (role == USB_ROLE_HOST && info->vbus) { in usb_conn_detect_cable() 107 info->last_role = role; in usb_conn_detect_cable()
|
/Linux-v5.15/drivers/usb/typec/mux/ |
D | intel_pmc_mux.c | 129 enum usb_role role; member 256 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_dp() 288 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_tbt() 331 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_usb4() 388 static int pmc_usb_connect(struct pmc_usb_port *port, enum usb_role role) in pmc_usb_connect() argument 390 u8 ufp = role == USB_ROLE_DEVICE ? 1 : 0; in pmc_usb_connect() 398 if (port->role == role || port->role == USB_ROLE_NONE) in pmc_usb_connect() 425 if (port->orientation == TYPEC_ORIENTATION_NONE || port->role == USB_ROLE_NONE) in pmc_usb_mux_set() 431 return pmc_usb_connect(port, port->role); in pmc_usb_mux_set() 446 return pmc_usb_connect(port, port->role); in pmc_usb_mux_set() [all …]
|