Home
last modified time | relevance | path

Searched refs:role (Results 1 – 25 of 277) sorted by relevance

12345678910>>...12

/linux/drivers/usb/dwc2/
H A Ddrd.c86 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 Dclass.c28 enum usb_role role; member
75 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument
87 ret = sw->set(sw, role); in usb_role_switch_set_role()
89 sw->role = role; in usb_role_switch_set_role()
108 enum usb_role role; in usb_role_switch_get_role() local
116 role = sw->get(sw); in usb_role_switch_get_role()
118 role = sw->role; in usb_role_switch_get_role()
122 return role; in usb_role_switch_get_role()
264 const char *usb_role_string(enum usb_role role) in usb_role_string() argument
266 if (role < 0 || role >= ARRAY_SIZE(usb_roles)) in usb_role_string()
[all …]
H A DKconfig6 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/extcon/
H A Dextcon-usbc-cros-ec.c28 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/drivers/s390/net/
H A Dqeth_l2_sys.c29 &card->options.sbp.role, &state, &os_mismatch); in qeth_bridge_port_role_state_show()
43 switch (card->options.sbp.role) { in qeth_bridge_port_role_state_show()
55 card->options.sbp.role, state); in qeth_bridge_port_role_state_show()
57 card->options.sbp.role == QETH_SBP_ROLE_NONE && in qeth_bridge_port_role_state_show()
84 enum qeth_sbp_roles role; in qeth_bridge_port_role_store() local
87 role = QETH_SBP_ROLE_PRIMARY; in qeth_bridge_port_role_store()
89 role = QETH_SBP_ROLE_SECONDARY; in qeth_bridge_port_role_store()
91 role = QETH_SBP_ROLE_NONE; in qeth_bridge_port_role_store()
104 rc = qeth_bridgeport_setrole(card, role); in qeth_bridge_port_role_store()
106 card->options.sbp.role = role; in qeth_bridge_port_role_store()
[all …]
H A Dqeth_l2.h15 enum qeth_sbp_roles *role,
18 int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role);
35 return card->options.sbp.role || in qeth_bridgeport_is_in_use()
/linux/net/bridge/
H A Dbr_mrp_switchdev.c66 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 Dbr_private_mrp.h71 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 Dbr_mrp.c261 * - when node role is MRM, in this case test_monitor is always set to false
264 * - when node role is MRA, there are 2 subcases:
265 * - when MRA behaves as MRM, in this case is similar with MRM role
288 * role MRA and behaves as MRC. The reason is that the in br_mrp_test_work_expired()
291 * the role of a MRM. in br_mrp_test_work_expired()
339 /* This function is continuously called when the node has the interconnect role
428 /* Stop sending MRP_InTest frames if has an interconnect role */ in br_mrp_del_impl()
605 /* Set port role, port role can be primary or secondary
609 enum br_mrp_port_role_type role) in br_mrp_set_port_role() argument
663 br_mrp_set_ring_role(struct net_bridge * br,struct br_mrp_ring_role * role) br_mrp_set_ring_role() argument
749 br_mrp_set_in_role(struct net_bridge * br,struct br_mrp_in_role * role) br_mrp_set_in_role() argument
[all...]
/linux/drivers/usb/chipidea/
H A Dcore.c575 if (ci->role != CI_ROLE_END) in ci_irq_handler()
606 enum usb_role role; in ci_usb_role_switch_get() local
610 role = ci_role_to_usb_role(ci); in ci_usb_role_switch_get()
613 return role; in ci_usb_role_switch_get()
617 enum usb_role role) in ci_usb_role_switch_set() argument
624 cable->connected = (role == USB_ROLE_HOST); in ci_usb_role_switch_set()
628 cable->connected = (role == USB_ROLE_DEVICE); in ci_usb_role_switch_set()
636 enum ci_role role; in ci_get_role() local
640 role = ci_otg_role(ci); in ci_get_role()
645 * role switc in ci_get_role()
840 enum ci_role role; ci_power_lost_work() local
982 enum ci_role role; role_store() local
[all...]
/linux/arch/x86/kvm/mmu/
H A Dmmutrace.h14 __field(__u32, role) \
21 __entry->role = sp->role.word; \
31 union kvm_mmu_page_role role; \
33 role.word = __entry->role; \
38 __entry->gfn, role.level, \
39 role.has_4_byte_gpte ? 4 : 8, \
40 role.quadrant, \
41 role.direct ? " direct" : "", \
42 access_str[role.access], \
43 role.invalid ? " invalid" : "", \
[all …]
H A Dmmu.c225 * The MMU itself (with a valid role) is the single source of truth for the
226 * MMU. Do not use the regs used to build the MMU/role, nor the vCPU. The
301 kvm_flush_remote_tlbs_gfn(kvm, gfn, sp->role.level); in kvm_flush_remote_tlbs_sptep()
537 int level = sptep_to_sp(sptep)->role.level; in mmu_spte_clear_track_bits()
657 if (sp->role.passthrough) in kvm_mmu_page_get_gfn()
663 return sp->gfn + (index << ((sp->role.level - 1) * SPTE_LEVEL_BITS)); in kvm_mmu_page_get_gfn()
687 * In both cases, sp->role.access contains the correct access bits. in kvm_mmu_page_get_access()
689 return sp->role.access; in kvm_mmu_page_get_access()
702 sp->role.passthrough ? "passthrough" : "direct", in kvm_mmu_page_set_translation()
707 sp->role in kvm_mmu_page_set_translation()
2288 kvm_mmu_find_shadow_page(struct kvm * kvm,struct kvm_vcpu * vcpu,gfn_t gfn,struct hlist_head * sp_list,union kvm_mmu_page_role role) kvm_mmu_find_shadow_page() argument
2373 kvm_mmu_alloc_shadow_page(struct kvm * kvm,struct shadow_page_caches * caches,gfn_t gfn,struct hlist_head * sp_list,union kvm_mmu_page_role role) kvm_mmu_alloc_shadow_page() argument
2409 __kvm_mmu_get_shadow_page(struct kvm * kvm,struct kvm_vcpu * vcpu,struct shadow_page_caches * caches,gfn_t gfn,union kvm_mmu_page_role role) __kvm_mmu_get_shadow_page() argument
2435 kvm_mmu_get_shadow_page(struct kvm_vcpu * vcpu,gfn_t gfn,union kvm_mmu_page_role role) kvm_mmu_get_shadow_page() argument
2450 union kvm_mmu_page_role role; kvm_mmu_child_role() local
2499 union kvm_mmu_page_role role = kvm_mmu_child_role(sptep, direct, access); kvm_mmu_get_child_sp() local
3981 union kvm_mmu_page_role role = vcpu->arch.mmu->root_role; mmu_alloc_root() local
5263 is_root_usable(struct kvm_mmu_root_info * root,gpa_t pgd,union kvm_mmu_page_role role) is_root_usable() argument
5911 union kvm_cpu_role role = {0}; kvm_calc_cpu_role() local
5993 union kvm_mmu_page_role role = {0}; kvm_calc_tdp_mmu_root_page_role() local
6128 union kvm_cpu_role role = {0}; kvm_calc_shadow_ept_root_page_role() local
7232 union kvm_mmu_page_role role; shadow_mmu_get_sp_for_split() local
[all...]
/linux/Documentation/ABI/testing/
H A Dsysfs-platform-chipidea-usb21 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 Dsysfs-class-usb_role6 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/include/linux/usb/
H A Drole.h17 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/arch/arm64/boot/dts/qcom/
H A Dsc7280-idp-ec-h1.dtsi45 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/common/
H A Dusb-conn-gpio.c23 #include <linux/usb/role.h>
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()
92 dev_dbg(info->dev, "role %s -> %s, gpios: id %d, vbus %d\n", 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()
[all...]
/linux/drivers/net/dsa/sja1105/
H A Dsja1105_clocking.c152 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/block/drbd/
H A Ddrbd_state.c105 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/media/tuners/
H A Dit913x.c18 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()
/linux/security/selinux/ss/
H A Dpolicydb.c268 struct role_datum *role; in role_destroy() local
272 role = datum; in role_destroy()
273 ebitmap_destroy(&role->dominates); in role_destroy()
274 ebitmap_destroy(&role->types); in role_destroy()
386 * Initialize the role table.
392 struct role_datum *role; in roles_init() local
394 role = kzalloc_obj(*role); in roles_init()
395 if (!role) in roles_init()
399 role in roles_init()
586 struct role_datum *role; role_index() local
996 policydb_role_isvalid(const struct policydb * p,u32 role) policydb_role_isvalid() argument
1037 const struct role_datum *role; policydb_context_isvalid() local
1660 struct role_datum *role; role_read() local
1979 struct role_datum *upper, *role; role_bounds_sanity_check() local
3528 struct role_datum *role = datum; role_write() local
[all...]
H A Dservices.c308 val1 = scontext->role; in constraint_expr_eval()
309 val2 = tcontext->role; in constraint_expr_eval()
410 val1 = c->role; in constraint_expr_eval()
699 * role is changing, then check the (current_role, new_role) in context_struct_compute_av()
704 scontext->role != tcontext->role) { in context_struct_compute_av()
706 if (scontext->role == ra->role && in context_struct_compute_av()
707 tcontext->role == ra->new_role) in context_struct_compute_av()
1284 *scontext_len += strlen(sym_name(p, SYM_ROLES, context->role in context_struct_to_string()
1481 struct role_datum *role; string_to_context_struct() local
2062 struct role_datum *role; services_convert_context() local
[all...]
/linux/drivers/platform/chrome/
H A Dcros_ec_typec.c47 /* Supply the USB role switch with the correct pld_crc if it's missing. */ in cros_typec_role_switch_quirk()
48 switch_fwnode = fwnode_find_reference(fwnode, "usb-role-switch", 0); in cros_typec_role_switch_quirk()
74 * Decode the role relevant to @swap_type out of an EC_CMD_USB_PD_CONTROL
77 * Returns a value comparable against the typec class target role
79 * @swap_type is not a role swap this driver knows how to track.
85 return (resp->role & PD_CTRL_RESP_ROLE_DATA) ? TYPEC_HOST : TYPEC_DEVICE; in cros_typec_resp_to_role()
87 return (resp->role & PD_CTRL_RESP_ROLE_POWER) ? TYPEC_SOURCE : TYPEC_SINK; in cros_typec_resp_to_role()
100 int role, ret; in cros_typec_perform_role_swap() local
102 /* Must be at least v1 to support role swap. */ in cros_typec_perform_role_swap()
108 req.role in cros_typec_perform_role_swap()
170 cros_typec_dr_swap(struct typec_port * port,enum typec_data_role role) cros_typec_dr_swap() argument
175 cros_typec_pr_swap(struct typec_port * port,enum typec_role role) cros_typec_pr_swap() argument
[all...]
/linux/net/bluetooth/bnep/
H A Dbnep.h112 __u16 role; member
123 __u16 role; member
148 unsigned int role; member
/linux/arch/arm/mach-omap2/
H A Domap_hwmod_3xxx_data.c415 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
446 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
447 { .role = "tv_clk", .clk = "dss_tv_fck" },
449 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
541 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
559 { .role = "ick", .clk = "dss_ick" },
578 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
663 { .role = "dbclk", .clk = "gpio1_dbck", },
684 { .role = "dbclk", .clk = "gpio2_dbck", },
705 { .role = "dbclk", .clk = "gpio3_dbck", },
[all …]

12345678910>>...12