Home
last modified time | relevance | path

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

12345678910

/Linux-v4.19/drivers/usb/chipidea/
Dci.h212 enum ci_role role; member
261 BUG_ON(ci->role >= CI_ROLE_END || !ci->roles[ci->role]); in ci_role()
262 return ci->roles[ci->role]; in ci_role()
265 static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role) in ci_role_start() argument
269 if (role >= CI_ROLE_END) in ci_role_start()
272 if (!ci->roles[role]) in ci_role_start()
275 ret = ci->roles[role]->start(ci); in ci_role_start()
277 ci->role = role; in ci_role_start()
283 enum ci_role role = ci->role; in ci_role_stop() local
285 if (role == CI_ROLE_END) in ci_role_stop()
[all …]
Dotg.c122 enum ci_role role = hw_read_otgsc(ci, OTGSC_ID) in ci_otg_role() local
126 return role; in ci_otg_role()
167 enum ci_role role = ci_otg_role(ci); in ci_handle_id_switch() local
169 if (role != ci->role) { in ci_handle_id_switch()
171 ci_role(ci)->name, ci->roles[role]->name); in ci_handle_id_switch()
175 if (role == CI_ROLE_GADGET && in ci_handle_id_switch()
186 ci_role_start(ci, role); in ci_handle_id_switch()
188 if (role == CI_ROLE_GADGET) in ci_handle_id_switch()
Ddebug.c127 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()
Dcore.c582 if (ci->role != CI_ROLE_END) in ci_irq()
843 if (ci->role != CI_ROLE_END) in role_show()
853 enum ci_role role; in role_store() local
861 for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++) in role_store()
862 if (!strncmp(buf, ci->roles[role]->name, in role_store()
863 strlen(ci->roles[role]->name))) in role_store()
866 if (role == CI_ROLE_END || role == ci->role) in role_store()
872 ret = ci_role_start(ci, role); in role_store()
873 if (!ret && ci->role == CI_ROLE_GADGET) in role_store()
880 static DEVICE_ATTR_RW(role);
[all …]
/Linux-v4.19/drivers/usb/common/
Droles.c21 enum usb_role role; member
41 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument
50 ret = sw->set(sw->dev.parent, role); in usb_role_switch_set_role()
52 sw->role = role; in usb_role_switch_set_role()
69 enum usb_role role; in usb_role_switch_get_role() local
77 role = sw->get(sw->dev.parent); in usb_role_switch_get_role()
79 role = sw->role; in usb_role_switch_get_role()
83 return role; in usb_role_switch_get_role()
161 enum usb_role role = usb_role_switch_get_role(sw); in role_show() local
163 return sprintf(buf, "%s\n", usb_roles[role]); in role_show()
[all …]
/Linux-v4.19/arch/x86/kvm/
Dmmutrace.h14 __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.cr4_pae ? " pae" : "", \
39 role.quadrant, \
40 role.direct ? " direct" : "", \
41 access_str[role.access], \
42 role.invalid ? " invalid" : "", \
[all …]
Dmmu.c277 return sp->role.ad_disabled; in sp_ad_disabled()
1022 if (!sp->role.direct) in kvm_mmu_page_get_gfn()
1025 return sp->gfn + (index << ((sp->role.level - 1) * PT64_LEVEL_BITS)); in kvm_mmu_page_get_gfn()
1030 if (sp->role.direct) in kvm_mmu_page_set_gfn()
1081 slots = kvm_memslots_for_spte_role(kvm, sp->role); in account_shadowed()
1085 if (sp->role.level > PT_PAGE_TABLE_LEVEL) in account_shadowed()
1100 slots = kvm_memslots_for_spte_role(kvm, sp->role); in unaccount_shadowed()
1102 if (sp->role.level > PT_PAGE_TABLE_LEVEL) in unaccount_shadowed()
1319 slots = kvm_memslots_for_spte_role(kvm, sp->role); in gfn_to_rmap()
1321 return __gfn_to_rmap(gfn, sp->role.level, slot); in gfn_to_rmap()
[all …]
Dmmu_audit.c141 slots = kvm_memslots_for_spte_role(kvm, rev_sp->role); in inspect_spte_has_rmap()
153 rmap_head = __gfn_to_rmap(gfn, rev_sp->role.level, slot); in inspect_spte_has_rmap()
182 if (sp->role.level != PT_PAGE_TABLE_LEVEL) in check_mappings_rmap()
201 if (sp->role.direct || sp->unsync || sp->role.invalid) in audit_write_protection()
204 slots = kvm_memslots_for_spte_role(kvm, sp->role); in audit_write_protection()
212 sp->gfn, sp->role.word); in audit_write_protection()
/Linux-v4.19/drivers/usb/roles/
Dintel-xhci-usb-role-switch.c42 static int intel_xhci_usb_set_role(struct device *dev, enum usb_role role) in intel_xhci_usb_set_role() argument
64 switch (role) { in intel_xhci_usb_set_role()
90 if (!!(val & HOST_MODE) == (role == USB_ROLE_HOST)) { in intel_xhci_usb_set_role()
108 enum usb_role role; in intel_xhci_usb_get_role() local
116 role = USB_ROLE_HOST; in intel_xhci_usb_get_role()
118 role = USB_ROLE_DEVICE; in intel_xhci_usb_get_role()
120 role = USB_ROLE_NONE; in intel_xhci_usb_get_role()
122 return role; in intel_xhci_usb_get_role()
/Linux-v4.19/drivers/s390/net/
Dqeth_l2_sys.c30 &card->options.sbp.role, &state); in qeth_bridge_port_role_state_show()
44 switch (card->options.sbp.role) { in qeth_bridge_port_role_state_show()
56 card->options.sbp.role, state); in qeth_bridge_port_role_state_show()
80 enum qeth_sbp_roles role; in qeth_bridge_port_role_store() local
85 role = QETH_SBP_ROLE_PRIMARY; in qeth_bridge_port_role_store()
87 role = QETH_SBP_ROLE_SECONDARY; in qeth_bridge_port_role_store()
89 role = QETH_SBP_ROLE_NONE; in qeth_bridge_port_role_store()
101 rc = qeth_bridgeport_setrole(card, role); in qeth_bridge_port_role_store()
103 card->options.sbp.role = role; in qeth_bridge_port_role_store()
105 card->options.sbp.role = role; in qeth_bridge_port_role_store()
[all …]
/Linux-v4.19/drivers/extcon/
Dextcon-usbc-cros-ec.c151 pd_control.role = USB_PD_CTRL_ROLE_NO_CHANGE; in cros_ec_usb_get_role()
165 return resp.role; in cros_ec_usb_get_role()
187 static const char *cros_ec_usb_role_string(unsigned int role) in cros_ec_usb_role_string() argument
189 return role == DR_NONE ? "DISCONNECTED" : in cros_ec_usb_role_string()
190 (role == DR_HOST ? "DFP" : "UFP"); in cros_ec_usb_role_string()
222 unsigned int role) in cros_ec_usb_power_type_is_wall_wart() argument
250 int role, power_type; in extcon_cros_ec_detect_cable() local
265 role = cros_ec_usb_get_role(info, &polarity); in extcon_cros_ec_detect_cable()
266 if (role < 0) { in extcon_cros_ec_detect_cable()
267 if (role != -ENOTCONN) { in extcon_cros_ec_detect_cable()
[all …]
Dextcon-axp288.c173 enum usb_role role; in axp288_get_id_pin() local
179 role = usb_role_switch_get_role(info->role_sw); in axp288_get_id_pin()
180 return role != USB_ROLE_HOST; in axp288_get_id_pin()
187 enum usb_role role; in axp288_usb_role_work() local
193 role = USB_ROLE_HOST; in axp288_usb_role_work()
195 role = USB_ROLE_DEVICE; in axp288_usb_role_work()
197 role = USB_ROLE_NONE; in axp288_usb_role_work()
199 ret = usb_role_switch_set_role(info->role_sw, role); in axp288_usb_role_work()
/Linux-v4.19/Documentation/ABI/testing/
Dsysfs-platform-chipidea-usb21 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.
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-v4.19/scripts/
Dget_maintainer.pl1235 my $role = "unknown";
1244 $role = $pvalue;
1249 $role = lc($role);
1250 if ($role eq "supported") {
1251 $role = "supporter";
1252 } elsif ($role eq "maintained") {
1253 $role = "maintainer";
1254 } elsif ($role eq "odd fixes") {
1255 $role = "odd fixer";
1256 } elsif ($role eq "orphan") {
[all …]
/Linux-v4.19/tools/lib/traceevent/
Dplugin_kvm.c380 union kvm_mmu_page_role role; in kvm_mmu_print_role() local
385 role.word = (int)val; in kvm_mmu_print_role()
395 role.level, in kvm_mmu_print_role()
396 role.quadrant, in kvm_mmu_print_role()
397 role.direct ? " direct" : "", in kvm_mmu_print_role()
398 access_str[role.access], in kvm_mmu_print_role()
399 role.invalid ? " invalid" : "", in kvm_mmu_print_role()
400 role.cr4_pae ? "" : "!", in kvm_mmu_print_role()
401 role.nxe ? "" : "!", in kvm_mmu_print_role()
402 role.cr0_wp ? "" : "!", in kvm_mmu_print_role()
[all …]
/Linux-v4.19/net/netfilter/
Dnf_conntrack_proto_dccp.c419 ct->proto.dccp.role[IP_CT_DIR_ORIGINAL] = CT_DCCP_ROLE_CLIENT; in dccp_new()
420 ct->proto.dccp.role[IP_CT_DIR_REPLY] = CT_DCCP_ROLE_SERVER; in dccp_new()
447 enum ct_dccp_roles role; in dccp_packet() local
463 role = ct->proto.dccp.role[dir]; in dccp_packet()
465 new_state = dccp_state_table[role][type][old_state]; in dccp_packet()
470 role == CT_DCCP_ROLE_SERVER) { in dccp_packet()
473 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_CLIENT; in dccp_packet()
474 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_SERVER; in dccp_packet()
496 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_CLIENT; in dccp_packet()
497 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_SERVER; in dccp_packet()
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/connector/
Dusb-connector.txt19 - power-role: should be one of "source", "sink" or "dual"(DRP) if typec
21 - try-power-role: preferred power role if "dual"(DRP) can support Try.SNK
23 - data-role: should be one of "host", "device", "dual"(DRD) if typec
31 the PD spec chapter 6.4.1. Required for power source and power dual role.
38 the PD spec chapter 6.4.1. Required for power sink and power dual role.
43 sink and power dual role.
112 power-role = "dual";
113 try-power-role = "sink";
/Linux-v4.19/security/selinux/ss/
Dcontext.h29 u32 role; member
123 dst->role = src->role; in context_cpy()
144 c->user = c->role = c->type = 0; in context_destroy()
158 (c1->role == c2->role) && in context_cmp()
Dpolicydb.c189 struct role_datum *role; in roles_init() local
191 role = kzalloc(sizeof(*role), GFP_KERNEL); in roles_init()
192 if (!role) in roles_init()
196 role->value = ++p->p_roles.nprim; in roles_init()
197 if (role->value != OBJECT_R_VAL) in roles_init()
205 rc = hashtab_insert(p->p_roles.table, key, role); in roles_init()
212 kfree(role); in roles_init()
379 struct role_datum *role; in role_index() local
382 role = datum; in role_index()
384 if (!role->value in role_index()
[all …]
/Linux-v4.19/drivers/media/tuners/
Dit913x.c28 u8 role:2; member
46 dev_dbg(&pdev->dev, "role %u\n", dev->role); in it913x_init()
163 dev_dbg(&pdev->dev, "role %u\n", dev->role); in it913x_sleep()
175 if (dev->role == IT913X_ROLE_DUAL_MASTER) in it913x_sleep()
180 dev_dbg(&pdev->dev, "role %u, len %d\n", dev->role, len); in it913x_sleep()
228 dev->role, c->frequency, c->bandwidth_hz); in it913x_set_params()
408 dev->role = pdata->role; in it913x_probe()
424 dev_dbg(&pdev->dev, "chip_ver %u, role %u\n", dev->chip_ver, dev->role); in it913x_probe()
/Linux-v4.19/drivers/block/drbd/
Ddrbd_state.c117 state_change->resource->role[OLD] = in remember_old_state()
179 resource_state_change->role[NEW] = in remember_new_state()
231 OLD_TO_NEW(resource_state_change->role); in copy_old_to_new_state_change()
317 device->state.role != R_SECONDARY) { in conn_all_vols_unconf()
349 enum drbd_role role = R_SECONDARY; in conn_highest_role() local
356 role = max_role(role, device->state.role); in conn_highest_role()
360 return role; in conn_highest_role()
483 ((os.role != R_PRIMARY && ns.role == R_PRIMARY) || in cl_wide_st_chg()
734 drbd_role_str(ns.role), in print_st()
764 if (ns.role != os.role && flags & CS_DC_ROLE) in print_state_change()
[all …]
/Linux-v4.19/include/linux/usb/
Dtypec.h203 int role);
234 void typec_set_data_role(struct typec_port *port, enum typec_data_role role);
235 void typec_set_pwr_role(struct typec_port *port, enum typec_role role);
236 void typec_set_vconn_role(struct typec_port *port, enum typec_role role);
/Linux-v4.19/Documentation/devicetree/bindings/usb/
Dtypec-tcpci.txt29 data-role = "dual";
30 power-role = "dual";
31 try-power-role = "sink";
Dfsl-usb.txt10 controllers, or "fsl-usb2-dr" for dual role USB controllers
11 or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121.
15 "ulpi", or "serial". For dual role USB controllers, should be
56 Example dual role USB controller device node :
68 Example dual role USB controller device node for MPC5121ADS:

12345678910