Home
last modified time | relevance | path

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

12345678910>>...19

/linux/drivers/usb/cdns3/
H A Dcore.c37 cdns->role = role; in cdns_role_start()
57 enum usb_role role = cdns->role; in cdns_role_stop() local
223 return role; in cdns_hw_role_state_machine()
235 role = cdns->role; in cdns_hw_role_state_machine()
237 switch (role) { in cdns_hw_role_state_machine()
258 dev_dbg(cdns->dev, "role %d -> %d\n", cdns->role, role); in cdns_hw_role_state_machine()
260 return role; in cdns_hw_role_state_machine()
346 return cdns->role; in cdns_role_get()
365 if (cdns->role == role) in cdns_role_set()
369 switch (role) { in cdns_role_set()
[all …]
/linux/drivers/usb/dwc2/
H A Ddrd.c122 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()
130 if (role == USB_ROLE_HOST) { in dwc2_drd_role_sw_set()
158 role == USB_ROLE_NONE ? "No" : in dwc2_drd_role_sw_set()
211 enum usb_role role; in dwc2_drd_resume() local
217 if (role == USB_ROLE_NONE) { in dwc2_drd_resume()
219 role = USB_ROLE_HOST; in dwc2_drd_resume()
221 role = USB_ROLE_DEVICE; in dwc2_drd_resume()
225 if (role == USB_ROLE_HOST) in dwc2_drd_resume()
[all …]
/linux/drivers/usb/chipidea/
H A Dci.h220 enum ci_role role; member
272 BUG_ON(ci->role >= CI_ROLE_END || !ci->roles[ci->role]); in ci_role()
280 if (role >= CI_ROLE_END) in ci_role_start()
283 if (!ci->roles[role]) in ci_role_start()
290 ci->role = role; in ci_role_start()
293 if (role == CI_ROLE_HOST) in ci_role_start()
305 enum ci_role role = ci->role; in ci_role_stop() local
307 if (role == CI_ROLE_END) in ci_role_stop()
310 ci->role = CI_ROLE_END; in ci_role_stop()
312 ci->roles[role]->stop(ci); in ci_role_stop()
[all …]
H A Dotg.c124 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 Dcore.c604 enum usb_role role; in ci_usb_role_switch_get() local
611 return role; in ci_usb_role_switch_get()
615 enum usb_role role) in ci_usb_role_switch_set() argument
649 enum ci_role role; in ci_get_role() local
661 role = CI_ROLE_GADGET; in ci_get_role()
668 return role; in ci_get_role()
862 enum ci_role role; in ci_power_lost_work() local
869 if (ci->role != role) { in ci_power_lost_work()
1002 enum ci_role role; in role_store() local
1010 for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++) in role_store()
[all …]
/linux/drivers/usb/roles/
H A Dclass.c26 enum usb_role role; member
85 ret = sw->set(sw, role); in usb_role_switch_set_role()
87 sw->role = role; in usb_role_switch_set_role()
106 enum usb_role role; in usb_role_switch_get_role() local
114 role = sw->get(sw); in usb_role_switch_get_role()
116 role = sw->role; in usb_role_switch_get_role()
120 return role; in usb_role_switch_get_role()
259 if (role < 0 || role >= ARRAY_SIZE(usb_roles)) in usb_role_string()
262 return usb_roles[role]; in usb_role_string()
272 return sprintf(buf, "%s\n", usb_roles[role]); in role_show()
[all …]
H A Dintel-xhci-usb-role-switch.c56 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/include/linux/usb/
H A Dtypec.h59 static inline int is_sink(enum typec_role role) in is_sink() argument
61 return role == TYPEC_SINK; in is_sink()
64 static inline int is_source(enum typec_role role) in is_source() argument
66 return role == TYPEC_SOURCE; in is_source()
242 int (*try_role)(struct typec_port *port, int role);
243 int (*dr_set)(struct typec_port *port, enum typec_data_role role);
244 int (*pr_set)(struct typec_port *port, enum typec_role role);
245 int (*vconn_set)(struct typec_port *port, enum typec_role role);
315 void typec_set_data_role(struct typec_port *port, enum typec_data_role role);
316 void typec_set_pwr_role(struct typec_port *port, enum typec_role role);
[all …]
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/drivers/usb/dwc3/
H A Ddwc3-rtk.c72 switch (role) { in switch_usb2_role()
80 dev_dbg(rtk->dev, "%s: role=%d\n", __func__, role); in switch_usb2_role()
90 usb_role_switch_set_role(rtk->dwc->role_sw, role); in switch_dwc3_role()
95 enum usb_role role; in dwc3_rtk_get_role() local
97 role = rtk->cur_role; in dwc3_rtk_get_role()
100 role = usb_role_switch_get_role(rtk->dwc->role_sw); in dwc3_rtk_get_role()
104 return role; in dwc3_rtk_get_role()
109 rtk->cur_role = role; in dwc3_rtk_set_role()
111 switch_dwc3_role(rtk, role); in dwc3_rtk_set_role()
113 switch_usb2_role(rtk, role); in dwc3_rtk_set_role()
[all …]
/linux/drivers/extcon/
H A Dextcon-usbc-cros-ec.c152 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()
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()
270 return role; in extcon_cros_ec_detect_cable()
[all …]
/linux/Documentation/devicetree/bindings/usb/
H A Dmediatek,mtu3.yaml132 when supports dual-role mode.
136 usb-role-switch:
138 description: Support role switch.
141 role-switch-default-mode:
214 connector: [ usb-role-switch ]
215 port: [ usb-role-switch ]
216 role-switch-default-mode: [ usb-role-switch ]
230 # Dual role switch by extcon
284 usb-role-switch;
307 # Dual role switch with type-c
[all …]
/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_mrp_netlink.c109 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()
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()
308 role.in_id = nla_get_u16(tb[IFLA_BRIDGE_MRP_IN_ROLE_IN_ID]); in br_mrp_in_role_parse()
310 role.in_role = nla_get_u32(tb[IFLA_BRIDGE_MRP_IN_ROLE_ROLE]); in br_mrp_in_role_parse()
[all …]
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);
/linux/drivers/s390/net/
H A Dqeth_l2_sys.c28 &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/drivers/misc/
H A Dhisi_hikey_usb.c43 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/arch/x86/kvm/mmu/
H A Dmmutrace.h14 __field(__u32, role) \
21 __entry->role = sp->role.word; \
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" : "", \
43 role.efer_nx ? "" : "!", \
[all …]
H A Dmmu.c2128 if (sp->role.word != role.word) { in kvm_mmu_find_shadow_page()
2223 sp->role = role; in kvm_mmu_alloc_shadow_page()
2273 role = parent_sp->role; in kvm_mmu_child_role()
2274 role.level--; in kvm_mmu_child_role()
2310 return role; in kvm_mmu_child_role()
3663 WARN_ON_ONCE(role.direct && role.has_4_byte_gpte); in mmu_alloc_root()
4686 return role.word == sp->role.word; in is_root_usable()
5271 return role; in kvm_calc_cpu_role()
5296 return role; in kvm_calc_cpu_role()
5348 return role; in kvm_calc_tdp_mmu_root_page_role()
[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.
/linux/scripts/
H A Dget_maintainer.pl1276 my $role = "unknown";
1285 $role = $pvalue;
1290 $role = lc($role);
1292 $role = "supporter";
1294 $role = "maintainer";
1296 $role = "odd fixer";
1298 $role = "orphan minder";
1302 $role = "chief penguin";
1451 && ($role eq "" || !($entry->[1] =~ m/$role/))
1461 && ($role eq "" || !($entry->[1] =~ m/$role/))
[all …]
/linux/drivers/usb/common/
H A Dusb-conn-gpio.c68 enum usb_role role; in usb_conn_detect_cable() local
81 role = USB_ROLE_HOST; in usb_conn_detect_cable()
83 role = USB_ROLE_DEVICE; in usb_conn_detect_cable()
85 role = USB_ROLE_NONE; in usb_conn_detect_cable()
88 usb_role_string(info->last_role), usb_role_string(role), id, vbus); in usb_conn_detect_cable()
90 if (!info->initial_detection && info->last_role == role) { in usb_conn_detect_cable()
91 dev_warn(info->dev, "repeated role: %s\n", usb_role_string(role)); in usb_conn_detect_cable()
100 ret = usb_role_switch_set_role(info->role_sw, role); in usb_conn_detect_cable()
104 if (role == USB_ROLE_HOST && info->vbus) { in usb_conn_detect_cable()
110 info->last_role = role; in usb_conn_detect_cable()
/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/net/netfilter/
H A Dnf_conntrack_proto_dccp.c412 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()
656 ct->proto.dccp.role[IP_CT_DIR_ORIGINAL]) || in dccp_to_nlattr()
[all …]
/linux/drivers/usb/musb/
H A Dmediatek.c51 enum usb_role role; member
72 if (role == glue->role) in mtk_otg_switch_set()
75 switch (role) { in mtk_otg_switch_set()
80 if (glue->role == USB_ROLE_NONE) in mtk_otg_switch_set()
93 if (glue->role == USB_ROLE_NONE) in mtk_otg_switch_set()
103 if (glue->role != USB_ROLE_NONE) in mtk_otg_switch_set()
112 glue->role = new_role; in mtk_otg_switch_set()
127 return glue->role; in musb_usb_role_sx_get()
440 glue->role = USB_ROLE_HOST; in mtk_musb_probe()
444 glue->role = USB_ROLE_DEVICE; in mtk_musb_probe()
[all …]

12345678910>>...19