| /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/roles/ |
| H A D | class.c | 11 #include <linux/usb/role.h> 28 enum usb_role role; member 50 ret = sysfs_create_link(&connector->kobj, &dev->kobj, "usb-role-switch"); in connector_bind() 59 sysfs_remove_link(&connector->kobj, "usb-role-switch"); in connector_unbind() 69 * usb_role_switch_set_role - Set USB role for a switch 70 * @sw: USB role switch 71 * @role: USB role to be switched to 73 * Set USB role @role fo 75 usb_role_switch_set_role(struct usb_role_switch * sw,enum usb_role role) usb_role_switch_set_role() argument 108 enum usb_role role; usb_role_switch_get_role() local 259 usb_role_string(enum usb_role role) usb_role_string() argument 272 enum usb_role role = usb_role_switch_get_role(sw); role_show() local [all...] |
| 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/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()
|
| H A D | core.c | 574 if (ci->role != CI_ROLE_END) in ci_irq_handler() 605 enum usb_role role; in ci_usb_role_switch_get() local 609 role = ci_role_to_usb_role(ci); in ci_usb_role_switch_get() 612 return role; in ci_usb_role_switch_get() 616 enum usb_role role) in ci_usb_role_switch_set() argument 621 if (role == USB_ROLE_HOST) { in ci_usb_role_switch_set() 628 } else if (role == USB_ROLE_DEVICE) { in ci_usb_role_switch_set() 650 enum ci_role role; in ci_get_role() local 654 role = ci_otg_role(ci); in ci_get_role() 662 role = CI_ROLE_GADGET; in ci_get_role() [all …]
|
| /linux/drivers/extcon/ |
| H A D | extcon-usbc-cros-ec.c | 28 unsigned int dr; /* data role */ 29 bool pr; /* power role (true if VBUS enabled) */ 136 * cros_ec_usb_get_role() - Get role info about possible PD device attached to a 141 * Return: role info on success, -ENOTCONN if no cable is connected, <0 on 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; extcon_cros_ec_detect_cable() local [all...] |
| /linux/include/linux/usb/ |
| H A D | typec.h | 62 static inline int is_sink(enum typec_role role) in is_sink() 64 return role == TYPEC_SINK; in is_source() argument 67 static inline int is_source(enum typec_role role) in is_source() 69 return role == TYPEC_SOURCE; 255 * @try_role: Set data role preference for DRP port 266 int (*try_role)(struct typec_port *port, int role); 267 int (*dr_set)(struct typec_port *port, enum typec_data_role role); 268 int (*pr_set)(struct typec_port *port, enum typec_role role); 269 int (*vconn_set)(struct typec_port *port, enum typec_role role); 286 * @type: Supported power role o 59 is_sink(enum typec_role role) is_sink() argument [all...] |
| 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/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 | 270 * - when node role is MRM, in this case test_monitor is always set to false 273 * - when node role is MRA, there are 2 subcases: 274 * - when MRA behaves as MRM, in this case is similar with MRM role 297 * role MRA and behaves as MRC. The reason is that the in br_mrp_test_work_expired() 300 * the role of a MRM. in br_mrp_test_work_expired() 348 /* This function is continuously called when the node has the interconnect role 437 /* Stop sending MRP_InTest frames if has an interconnect role */ in br_mrp_del_impl() 614 /* Set port role, port role can be primary or secondary 618 enum br_mrp_port_role_type role) in br_mrp_set_port_role() argument 672 br_mrp_set_ring_role(struct net_bridge * br,struct br_mrp_ring_role * role) br_mrp_set_ring_role() argument 758 br_mrp_set_in_role(struct net_bridge * br,struct br_mrp_in_role * role) br_mrp_set_in_role() argument [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 …]
|
| /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 | 289 kvm_flush_remote_tlbs_gfn(kvm, gfn, sp->role.level); in kvm_flush_remote_tlbs_sptep() 525 int level = sptep_to_sp(sptep)->role.level; in mmu_spte_clear_track_bits() 641 if (sp->role.passthrough) in kvm_mmu_page_get_gfn() 647 return sp->gfn + (index << ((sp->role.level - 1) * SPTE_LEVEL_BITS)); in kvm_mmu_page_get_gfn() 673 return sp->role.access; in kvm_mmu_page_get_access() 686 sp->role.passthrough ? "passthrough" : "direct", in kvm_mmu_page_set_translation() 691 sp->role.passthrough ? "passthrough" : "direct", in kvm_mmu_page_set_translation() 766 slots = kvm_memslots_for_spte_role(kvm, sp->role); in account_shadowed() 770 if (sp->role.level > PG_LEVEL_4K) in account_shadowed() 816 slots = kvm_memslots_for_spte_role(kvm, sp->role); in unaccount_shadowed() [all …]
|
| H A D | tdp_mmu.c | 89 KVM_BUG_ON(!is_tdp_mmu_page(root) || !root->role.invalid, kvm); in kvm_tdp_mmu_put_root() 103 if (root->role.invalid && !(types & KVM_INVALID_ROOTS)) in tdp_mmu_root_match() 225 gfn_t gfn, union kvm_mmu_page_role role) in tdp_mmu_init_sp() argument 231 sp->role = role; in tdp_mmu_init_sp() 243 union kvm_mmu_page_role role; in tdp_mmu_init_child_sp() local 247 role = parent_sp->role; in tdp_mmu_init_child_sp() 248 role.level--; in tdp_mmu_init_child_sp() 250 tdp_mmu_init_sp(child_sp, iter->sptep, iter->gfn, role); in tdp_mmu_init_child_sp() 256 union kvm_mmu_page_role role = mmu->root_role; in kvm_tdp_mmu_alloc_root() local 257 int as_id = kvm_mmu_role_as_id(role); in kvm_tdp_mmu_alloc_root() [all …]
|
| /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/drivers/usb/common/ |
| H A D | usb-conn-gpio.c | 73 enum usb_role role; in usb_conn_detect_cable() local 86 role = USB_ROLE_HOST; in usb_conn_detect_cable() 88 role = USB_ROLE_DEVICE; in usb_conn_detect_cable() 90 role = USB_ROLE_NONE; in usb_conn_detect_cable() 93 usb_role_string(info->last_role), usb_role_string(role), id, vbus); in usb_conn_detect_cable() 95 if (!info->initial_detection && info->last_role == role) { in usb_conn_detect_cable() 96 dev_warn(info->dev, "repeated role: %s\n", usb_role_string(role)); in usb_conn_detect_cable() 105 ret = usb_role_switch_set_role(info->role_sw, role); in usb_conn_detect_cable() 109 if (role == USB_ROLE_HOST && info->vbus) { in usb_conn_detect_cable() 115 info->last_role = role; in usb_conn_detect_cable()
|
| /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/usb/typec/mux/ |
| H A D | intel_pmc_mux.c | 141 enum usb_role role; member 296 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_dp() 346 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_tbt() 399 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; in pmc_usb_mux_usb4() 476 static int pmc_usb_connect(struct pmc_usb_port *port, enum usb_role role) in pmc_usb_connect() argument 478 u8 ufp = role == USB_ROLE_DEVICE ? 1 : 0; in pmc_usb_connect() 486 if (port->role == role || port->role == USB_ROLE_NONE) in pmc_usb_connect() 513 if (port->orientation == TYPEC_ORIENTATION_NONE || port->role == USB_ROLE_NONE) in pmc_usb_mux_set() 519 return pmc_usb_connect(port, port->role); in pmc_usb_mux_set() 534 return pmc_usb_connect(port, port->role); in pmc_usb_mux_set() [all …]
|
| /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/security/selinux/ss/ |
| H A D | policydb.c | 267 struct role_datum *role; in role_destroy() local 271 role = datum; in role_destroy() 272 ebitmap_destroy(&role->dominates); in role_destroy() 273 ebitmap_destroy(&role->types); in role_destroy() 385 * Initialize the role table. 391 struct role_datum *role; in roles_init() local 393 role = kzalloc_obj(*role); in roles_init() 394 if (!role) in roles_init() 398 role in roles_init() 585 struct role_datum *role; role_index() local 941 policydb_role_isvalid(struct policydb * p,unsigned int role) policydb_role_isvalid() argument 961 struct role_datum *role; policydb_context_isvalid() local 1422 struct role_datum *role; role_read() local 1723 struct role_datum *upper, *role; role_bounds_sanity_check() local 3175 struct role_datum *role = datum; role_write() local [all...] |
| /linux/drivers/media/tuners/ |
| H A 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() 218 dev_dbg(&pdev->dev, "role=%u, frequency %u, bandwidth_hz %u\n", in it913x_set_params() 219 dev->role, in it913x_set_params() [all...] |