/linux/drivers/usb/cdns3/ |
H A D | core.c | 29 static int cdns_role_start(struct cdns *cdns, enum usb_role role) in cdns_role_start() argument 33 if (WARN_ON(role > USB_ROLE_DEVICE)) in cdns_role_start() 37 cdns->role = role; in cdns_role_start() 40 if (!cdns->roles[role]) in cdns_role_start() 43 if (cdns->roles[role]->state == CDNS_ROLE_STATE_ACTIVE) in cdns_role_start() 47 ret = cdns->roles[role]->start(cdns); in cdns_role_start() 49 cdns->roles[role]->state = CDNS_ROLE_STATE_ACTIVE; in cdns_role_start() 57 enum usb_role role = cdns->role; in cdns_role_stop() local 214 enum usb_role role = USB_ROLE_NONE; cdns_hw_role_state_machine() local 358 cdns_role_set(struct usb_role_switch * sw,enum usb_role role) cdns_role_set() argument [all...] |
/linux/drivers/usb/dwc2/ |
H A 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() 139 if (role == USB_ROLE_HOST) { in dwc2_drd_role_sw_set() 141 } else if (role == USB_ROLE_DEVICE) { in dwc2_drd_role_sw_set() 161 dwc2_force_mode(hsotg, role == USB_ROLE_HOST); in dwc2_drd_role_sw_set() [all …]
|
/linux/drivers/usb/chipidea/ |
H A 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() 173 enum ci_role role; in ci_handle_id_switch() local 176 role = ci_otg_role(ci); in ci_handle_id_switch() 177 if (role != ci->role) { in ci_handle_id_switch() 179 ci_role(ci)->name, ci->roles[role]->name); in ci_handle_id_switch() 181 if (ci->vbus_active && ci->role == CI_ROLE_GADGET) in ci_handle_id_switch() 190 if (role == CI_ROLE_GADGET && in ci_handle_id_switch() 201 ci_role_start(ci, role); in ci_handle_id_switch() 203 if (role == CI_ROLE_GADGET) in ci_handle_id_switch()
|
/linux/drivers/extcon/ |
H A 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 …]
|
H A 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()
|
/linux/net/bridge/ |
H A 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()
|
H A 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 …]
|
H A D | br_private_mrp.h | 71 enum br_mrp_port_role_type role); 74 int br_mrp_set_ring_role(struct net_bridge *br, struct br_mrp_ring_role *role); 77 int br_mrp_set_in_role(struct net_bridge *br, struct br_mrp_in_role *role); 86 enum br_mrp_ring_role_type role); 95 enum br_mrp_port_role_type role); 99 enum br_mrp_in_role_type role);
|
H A D | br_mrp.c | 618 enum br_mrp_port_role_type role) in br_mrp_set_port_role() argument 630 switch (role) { in br_mrp_set_port_role() 641 br_mrp_port_switchdev_set_role(p, role); in br_mrp_set_port_role() 672 struct br_mrp_ring_role *role) in br_mrp_set_ring_role() argument 674 struct br_mrp *mrp = br_mrp_find_id(br, role->ring_id); in br_mrp_set_ring_role() 680 mrp->ring_role = role->ring_role; in br_mrp_set_ring_role() 683 support = br_mrp_switchdev_set_ring_role(br, mrp, role->ring_role); in br_mrp_set_ring_role() 758 int br_mrp_set_in_role(struct net_bridge *br, struct br_mrp_in_role *role) in br_mrp_set_in_role() argument 760 struct br_mrp *mrp = br_mrp_find_id(br, role->ring_id); in br_mrp_set_in_role() 767 if (!br_mrp_get_port(br, role->i_ifindex)) in br_mrp_set_in_role() [all …]
|
/linux/drivers/s390/net/ |
H A 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 …]
|
H A 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()
|
/linux/arch/x86/kvm/mmu/ |
H A 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.has_4_byte_gpte ? 4 : 8, \ 39 role.quadrant, \ 40 role.direct ? " direct" : "", \ 41 access_str[role.access], \ 42 role.invalid ? " invalid" : "", \ [all …]
|
H A D | mmu.c | 288 kvm_flush_remote_tlbs_gfn(kvm, gfn, sp->role.level); in kvm_flush_remote_tlbs_sptep() 524 int level = sptep_to_sp(sptep)->role.level; in mmu_spte_clear_track_bits() 640 if (sp->role.passthrough) in kvm_mmu_page_get_gfn() 646 return sp->gfn + (index << ((sp->role.level - 1) * SPTE_LEVEL_BITS)); in kvm_mmu_page_get_gfn() 672 return sp->role.access; in kvm_mmu_page_get_access() 685 sp->role.passthrough ? "passthrough" : "direct", in kvm_mmu_page_set_translation() 690 sp->role.passthrough ? "passthrough" : "direct", in kvm_mmu_page_set_translation() 765 slots = kvm_memslots_for_spte_role(kvm, sp->role); in account_shadowed() 769 if (sp->role.level > PG_LEVEL_4K) in account_shadowed() 813 slots = kvm_memslots_for_spte_role(kvm, sp->role); in unaccount_shadowed() [all …]
|
H A D | tdp_mmu.c | 87 KVM_BUG_ON(!is_tdp_mmu_page(root) || !root->role.invalid, kvm); in kvm_tdp_mmu_put_root() 101 if (root->role.invalid && !(types & KVM_INVALID_ROOTS)) in tdp_mmu_root_match() 210 gfn_t gfn, union kvm_mmu_page_role role) in tdp_mmu_init_sp() argument 216 sp->role = role; in tdp_mmu_init_sp() 228 union kvm_mmu_page_role role; in tdp_mmu_init_child_sp() local 232 role = parent_sp->role; in tdp_mmu_init_child_sp() 233 role.level--; in tdp_mmu_init_child_sp() 235 tdp_mmu_init_sp(child_sp, iter->sptep, iter->gfn, role); in tdp_mmu_init_child_sp() 241 union kvm_mmu_page_role role = mmu->root_role; in kvm_tdp_mmu_alloc_root() local 242 int as_id = kvm_mmu_role_as_id(role); in kvm_tdp_mmu_alloc_root() [all …]
|
/linux/drivers/misc/ |
H A D | hisi_hikey_usb.c | 43 enum usb_role role; member 97 enum usb_role role; in relay_set_role_switch() local 103 switch (hisi_hikey_usb->role) { in relay_set_role_switch() 123 role = hisi_hikey_usb->role; in relay_set_role_switch() 126 usb_role_switch_set_role(sw, role); in relay_set_role_switch() 129 static int hub_usb_role_switch_set(struct usb_role_switch *sw, enum usb_role role) in hub_usb_role_switch_set() argument 137 hisi_hikey_usb->role = role; in hub_usb_role_switch_set()
|
/linux/scripts/ |
H A D | get_maintainer.pl | 1287 my $role = "unknown"; 1296 $role = $pvalue; 1301 $role = lc($role); 1302 if ($role eq "supported") { 1303 $role = "supporter"; 1304 } elsif ($role eq "maintained") { 1305 $role = "maintainer"; 1306 } elsif ($role eq "odd fixes") { 1307 $role = "odd fixer"; 1308 } elsif ($role eq "orphan") { [all …]
|
/linux/net/netfilter/ |
H A D | nf_conntrack_proto_dccp.c | 411 ct->proto.dccp.role[IP_CT_DIR_ORIGINAL] = CT_DCCP_ROLE_CLIENT; in dccp_new() 412 ct->proto.dccp.role[IP_CT_DIR_REPLY] = CT_DCCP_ROLE_SERVER; in dccp_new() 522 enum ct_dccp_roles role; in nf_conntrack_dccp_packet() local 551 role = ct->proto.dccp.role[dir]; in nf_conntrack_dccp_packet() 553 new_state = dccp_state_table[role][type][old_state]; in nf_conntrack_dccp_packet() 558 role == CT_DCCP_ROLE_SERVER) { in nf_conntrack_dccp_packet() 561 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_CLIENT; in nf_conntrack_dccp_packet() 562 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_SERVER; in nf_conntrack_dccp_packet() 584 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_CLIENT; in nf_conntrack_dccp_packet() 585 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_SERVER; in nf_conntrack_dccp_packet() [all …]
|
/linux/include/linux/usb/ |
H A 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 119 static inline const char *usb_role_string(enum usb_role role) in usb_role_string() argument
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-platform-chipidea-usb2 | 1 What: /sys/bus/platform/devices/ci_hdrc.0/role 6 the current controller role. 8 It will do role switch when "gadget" or "host" is written to it. 9 Only controller at dual-role configuration supports writing.
|
H A D | sysfs-class-usb_role | 6 device that can select the data role (host or device) for USB 9 What: /sys/class/usb_role/<switch>/role 13 The current role of the switch. This attribute can be used for 14 requesting role swapping with non-USB Type-C ports. With USB
|
/linux/arch/arm64/boot/dts/qcom/ |
H A D | sc7280-idp-ec-h1.dtsi | 45 power-role = "dual"; 46 data-role = "host"; 47 try-power-role = "source"; 54 power-role = "dual"; 55 data-role = "host"; 56 try-power-role = "source";
|
/linux/drivers/block/drbd/ |
H A 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 …]
|
/linux/drivers/net/dsa/sja1105/ |
H A 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() 587 sja1105_mii_role_t role) in sja1105_rgmii_clocking_setup() argument 736 sja1105_mii_role_t role) in sja1105_rmii_clocking_setup() argument 742 (role == XMII_MAC) ? "MAC" : "PHY"); in sja1105_rmii_clocking_setup() [all …]
|
/linux/drivers/usb/roles/ |
H A 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.
|
/linux/drivers/usb/dwc3/ |
H A D | drd.c | 447 enum usb_role role) in dwc3_usb_role_switch_set() argument 452 switch (role) { in dwc3_usb_role_switch_set() 475 enum usb_role role; in dwc3_usb_role_switch_get() local 480 role = USB_ROLE_HOST; in dwc3_usb_role_switch_get() 483 role = USB_ROLE_DEVICE; in dwc3_usb_role_switch_get() 486 role = dwc->current_otg_role; in dwc3_usb_role_switch_get() 490 role = USB_ROLE_HOST; in dwc3_usb_role_switch_get() 492 role = USB_ROLE_DEVICE; in dwc3_usb_role_switch_get() 496 return role; in dwc3_usb_role_switch_get()
|