Home
last modified time | relevance | path

Searched refs:role (Results 1 - 25 of 389) sorted by relevance

12345678910>>...16

/kernel/linux/linux-6.6/drivers/usb/cdns3/
H A Dcore.c29 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...]
/kernel/linux/linux-6.6/drivers/usb/dwc2/
H A Ddrd.c3 * drd.c - DesignWare USB2 DRD Controller Dual-role support
13 #include <linux/usb/role.h>
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()
109 * If role-switch set is called before the udc_start, we need to enable in dwc2_drd_role_sw_set()
122 if (role == USB_ROLE_NONE) { in dwc2_drd_role_sw_set()
123 /* default operation mode when usb role is USB_ROLE_NONE */ in dwc2_drd_role_sw_set()
125 role in dwc2_drd_role_sw_set()
211 enum usb_role role; dwc2_drd_resume() local
[all...]
/kernel/linux/linux-5.10/drivers/usb/cdns3/
H A Dcore.c30 static int cdns3_role_start(struct cdns3 *cdns, enum usb_role role) in cdns3_role_start() argument
34 if (WARN_ON(role > USB_ROLE_DEVICE)) in cdns3_role_start()
38 cdns->role = role; in cdns3_role_start()
41 if (!cdns->roles[role]) in cdns3_role_start()
44 if (cdns->roles[role]->state == CDNS3_ROLE_STATE_ACTIVE) in cdns3_role_start()
48 ret = cdns->roles[role]->start(cdns); in cdns3_role_start()
50 cdns->roles[role]->state = CDNS3_ROLE_STATE_ACTIVE; in cdns3_role_start()
58 enum usb_role role = cdns->role; in cdns3_role_stop() local
204 enum usb_role role = USB_ROLE_NONE; cdns3_hw_role_state_machine() local
348 cdns3_role_set(struct usb_role_switch *sw, enum usb_role role) cdns3_role_set() argument
[all...]
/kernel/linux/linux-6.6/drivers/usb/chipidea/
H A Dci.h19 #include <linux/usb/role.h>
127 * struct ci_role_driver - host/gadget role driver
128 * @start: start this role
129 * @stop: stop this role
130 * @suspend: system suspend handler for this role
131 * @resume: system resume handler for this role
132 * @irq: irq handler for this role
133 * @name: role name string (host/gadget)
171 * @role: current role
220 enum ci_role role; global() member
276 ci_role_start(struct ci_hdrc *ci, enum ci_role role) ci_role_start() argument
305 enum ci_role role = ci->role; ci_role_stop() local
328 usb_role_to_ci_role(enum usb_role role) usb_role_to_ci_role() argument
[all...]
H A Dotg.c119 * ci_otg_role - pick role based on ID pin state
124 enum ci_role role = hw_read_otgsc(ci, OTGSC_ID) in ci_otg_role() local
128 return role; in ci_otg_role()
170 enum ci_role role; in ci_handle_id_switch() local
173 role = ci_otg_role(ci); in ci_handle_id_switch()
174 if (role != ci->role) { in ci_handle_id_switch()
176 ci_role(ci)->name, ci->roles[role]->name); in ci_handle_id_switch()
178 if (ci->vbus_active && ci->role == CI_ROLE_GADGET) in ci_handle_id_switch()
180 * vbus disconnect event is lost due to role in ci_handle_id_switch()
[all...]
/kernel/linux/linux-5.10/drivers/usb/typec/
H A Dqcom-pmic-typec.c15 #include <linux/usb/role.h>
69 enum usb_role role; in qcom_pmic_typec_check_connection() local
82 role = (stat & SNK_SRC_MODE) ? USB_ROLE_HOST : USB_ROLE_DEVICE; in qcom_pmic_typec_check_connection()
83 if (role == USB_ROLE_HOST) in qcom_pmic_typec_check_connection()
88 role = USB_ROLE_NONE; in qcom_pmic_typec_check_connection()
93 usb_role_switch_set_role(qcom_usb->role_sw, role); in qcom_pmic_typec_check_connection()
136 int ret, irq, role; in qcom_pmic_typec_probe() local
166 ret = fwnode_property_read_string(fwnode, "power-role", &buf); in qcom_pmic_typec_probe()
168 role = typec_find_port_power_role(buf); in qcom_pmic_typec_probe()
169 if (role < in qcom_pmic_typec_probe()
[all...]
/kernel/linux/linux-5.10/drivers/usb/chipidea/
H A Dci.h19 #include <linux/usb/role.h>
126 * struct ci_role_driver - host/gadget role driver
127 * @start: start this role
128 * @stop: stop this role
129 * @irq: irq handler for this role
130 * @name: role name string (host/gadget)
166 * @role: current role
173 * @work: work for role changing
207 * @mutex: protect code from concorrent running when doing role switc
215 enum ci_role role; global() member
270 ci_role_start(struct ci_hdrc *ci, enum ci_role role) ci_role_start() argument
288 enum ci_role role = ci->role; ci_role_stop() local
308 usb_role_to_ci_role(enum usb_role role) usb_role_to_ci_role() argument
[all...]
H A Dotg.c119 * ci_otg_role - pick role based on ID pin state
124 enum ci_role role = hw_read_otgsc(ci, OTGSC_ID) in ci_otg_role() local
128 return role; in ci_otg_role()
169 enum ci_role role; in ci_handle_id_switch() local
172 role = ci_otg_role(ci); in ci_handle_id_switch()
173 if (role != ci->role) { in ci_handle_id_switch()
175 ci_role(ci)->name, ci->roles[role]->name); in ci_handle_id_switch()
177 if (ci->vbus_active && ci->role == CI_ROLE_GADGET) in ci_handle_id_switch()
179 * vbus disconnect event is lost due to role in ci_handle_id_switch()
[all...]
/kernel/linux/linux-6.6/drivers/usb/roles/
H A Dclass.c10 #include <linux/usb/role.h>
25 enum usb_role role; member
40 * usb_role_switch_set_role - Set USB role for a switch
41 * @sw: USB role switch
42 * @role: USB role to be switched to
44 * Set USB role @role for @sw.
46 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument
58 ret = sw->set(sw, role); in usb_role_switch_set_role()
79 enum usb_role role; usb_role_switch_get_role() local
230 usb_role_string(enum usb_role role) usb_role_string() argument
243 enum usb_role role = usb_role_switch_get_role(sw); role_show() local
[all...]
H A Dintel-xhci-usb-role-switch.c3 * Intel XHCI (Cherry Trail, Broxton and others) USB OTG role switch driver
23 #include <linux/usb/role.h>
56 enum usb_role role) in intel_xhci_usb_set_role()
80 * SW_SWITCH_EN bits to be zero for role switch, in intel_xhci_usb_set_role()
84 switch (role) { in intel_xhci_usb_set_role()
116 if (!!(val & HOST_MODE) == (role == USB_ROLE_HOST)) { in intel_xhci_usb_set_role()
127 dev_warn(data->dev, "Timeout waiting for role-switch\n"); 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 in intel_xhci_usb_get_role()
55 intel_xhci_usb_set_role(struct usb_role_switch *sw, enum usb_role role) intel_xhci_usb_set_role() argument
[all...]
/kernel/linux/linux-5.10/drivers/usb/dwc2/
H A Ddrd.c3 * drd.c - DesignWare USB2 DRD Controller Dual-role support
13 #include <linux/usb/role.h>
72 static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role) in dwc2_drd_role_sw_set() argument
79 if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_drd_role_sw_set()
80 (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)) in dwc2_drd_role_sw_set()
86 if (role == USB_ROLE_NONE && hsotg->test_mode) { in dwc2_drd_role_sw_set()
95 * If role-switch set is called before the udc_start, we need to enable in dwc2_drd_role_sw_set()
108 if (role == USB_ROLE_HOST) { in dwc2_drd_role_sw_set()
110 } else if (role == USB_ROLE_DEVICE) { in dwc2_drd_role_sw_set()
130 dwc2_force_mode(hsotg, role in dwc2_drd_role_sw_set()
[all...]
/kernel/linux/linux-6.6/include/linux/usb/
H A Dtypec.h58 static inline int is_sink(enum typec_role role) in is_sink() argument
60 return role == TYPEC_SINK; in is_sink()
63 static inline int is_source(enum typec_role role) in is_source() argument
65 return role == TYPEC_SOURCE; in is_source()
224 * @try_role: Set data role preference for DRP port
233 int (*try_role)(struct typec_port *port, int role);
234 int (*dr_set)(struct typec_port *port, enum typec_data_role role);
235 int (*pr_set)(struct typec_port *port, enum typec_role role);
236 int (*vconn_set)(struct typec_port *port, enum typec_role role);
251 * @type: Supported power role o
[all...]
/kernel/linux/linux-5.10/drivers/usb/roles/
H A Dclass.c10 #include <linux/usb/role.h>
23 enum usb_role role; member
37 * usb_role_switch_set_role - Set USB role for a switch
38 * @sw: USB role switch
39 * @role: USB role to be switched to
41 * Set USB role @role for @sw.
43 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument
52 ret = sw->set(sw, role); in usb_role_switch_set_role()
73 enum usb_role role; usb_role_switch_get_role() local
228 enum usb_role role = usb_role_switch_get_role(sw); role_show() local
[all...]
H A Dintel-xhci-usb-role-switch.c3 * Intel XHCI (Cherry Trail, Broxton and others) USB OTG role switch driver
23 #include <linux/usb/role.h>
56 enum usb_role role) in intel_xhci_usb_set_role()
80 * SW_SWITCH_EN bits to be zero for role switch, in intel_xhci_usb_set_role()
84 switch (role) { in intel_xhci_usb_set_role()
116 if (!!(val & HOST_MODE) == (role == USB_ROLE_HOST)) { in intel_xhci_usb_set_role()
127 dev_warn(data->dev, "Timeout waiting for role-switch\n"); 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 in intel_xhci_usb_get_role()
55 intel_xhci_usb_set_role(struct usb_role_switch *sw, enum usb_role role) intel_xhci_usb_set_role() argument
[all...]
/kernel/linux/linux-5.10/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()
[all...]
/kernel/linux/linux-6.6/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()
[all...]
/kernel/linux/linux-5.10/drivers/misc/
H A Dhisi_hikey_usb.c22 #include <linux/usb/role.h>
45 enum usb_role role; member
102 enum usb_role role; in relay_set_role_switch() local
108 switch (hisi_hikey_usb->role) { in relay_set_role_switch()
128 role = hisi_hikey_usb->role; in relay_set_role_switch()
131 usb_role_switch_set_role(sw, role); in relay_set_role_switch()
134 static int hub_usb_role_switch_set(struct usb_role_switch *sw, enum usb_role role) in hub_usb_role_switch_set() argument
142 hisi_hikey_usb->role = role; in hub_usb_role_switch_set()
[all...]
/kernel/linux/linux-6.6/drivers/misc/
H A Dhisi_hikey_usb.c22 #include <linux/usb/role.h>
44 enum usb_role role; member
98 enum usb_role role; in relay_set_role_switch() local
104 switch (hisi_hikey_usb->role) { in relay_set_role_switch()
124 role = hisi_hikey_usb->role; in relay_set_role_switch()
127 usb_role_switch_set_role(sw, role); in relay_set_role_switch()
130 static int hub_usb_role_switch_set(struct usb_role_switch *sw, enum usb_role role) in hub_usb_role_switch_set() argument
138 hisi_hikey_usb->role = role; in hub_usb_role_switch_set()
[all...]
/kernel/linux/linux-6.6/net/bridge/
H A Dbr_mrp_switchdev.c66 enum br_mrp_ring_role_type role) in br_mrp_switchdev_set_ring_role()
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()
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()
234 .u.mrp_port_role = role, in br_mrp_port_switchdev_set_role()
65 br_mrp_switchdev_set_ring_role(struct net_bridge *br, struct br_mrp *mrp, enum br_mrp_ring_role_type role) br_mrp_switchdev_set_ring_role() argument
140 br_mrp_switchdev_set_in_role(struct net_bridge *br, struct br_mrp *mrp, u16 in_id, u32 ring_id, enum br_mrp_in_role_type role) br_mrp_switchdev_set_in_role() argument
228 br_mrp_port_switchdev_set_role(struct net_bridge_port *p, enum br_mrp_port_role_type role) br_mrp_port_switchdev_set_role() argument
[all...]
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()
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
[all...]
/kernel/linux/linux-6.6/arch/x86/kvm/mmu/
H A Dmmu.c218 * The MMU itself (with a valid role) is the single source of truth for the
219 * MMU. Do not use the regs used to build the MMU/role, nor the vCPU. The
293 kvm_flush_remote_tlbs_gfn(kvm, gfn, sp->role.level); in kvm_flush_remote_tlbs_sptep()
569 int level = sptep_to_sp(sptep)->role.level; in mmu_spte_clear_track_bits()
723 if (sp->role.passthrough) in kvm_mmu_page_get_gfn()
726 if (!sp->role.direct) in kvm_mmu_page_get_gfn()
729 return sp->gfn + (index << ((sp->role.level - 1) * SPTE_LEVEL_BITS)); in kvm_mmu_page_get_gfn()
753 * In both cases, sp->role.access contains the correct access bits. in kvm_mmu_page_get_access()
755 return sp->role.access; in kvm_mmu_page_get_access()
768 sp->role in kvm_mmu_page_set_translation()
2145 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
2230 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
2266 __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
2288 kvm_mmu_get_shadow_page(struct kvm_vcpu *vcpu, gfn_t gfn, union kvm_mmu_page_role role) kvm_mmu_get_shadow_page() argument
2305 union kvm_mmu_page_role role; kvm_mmu_child_role() local
2351 union kvm_mmu_page_role role; kvm_mmu_get_child_sp() local
3645 union kvm_mmu_page_role role = vcpu->arch.mmu->root_role; mmu_alloc_root() local
4522 is_root_usable(struct kvm_mmu_root_info *root, gpa_t pgd, union kvm_mmu_page_role role) is_root_usable() argument
5113 union kvm_cpu_role role = {0}; kvm_calc_cpu_role() local
5182 union kvm_mmu_page_role role = {0}; kvm_calc_tdp_mmu_root_page_role() local
5303 union kvm_cpu_role role = {0}; kvm_calc_shadow_ept_root_page_role() local
6345 union kvm_mmu_page_role role; shadow_mmu_get_sp_for_split() local
[all...]
/kernel/linux/linux-5.10/net/bridge/
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()
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
[all...]
/kernel/linux/linux-5.10/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()
222 cros_ec_usb_power_type_is_wall_wart(unsigned int type, unsigned int role) cros_ec_usb_power_type_is_wall_wart() argument
251 int role, power_type; extcon_cros_ec_detect_cable() local
[all...]
/kernel/linux/linux-6.6/drivers/usb/musb/
H A Dmediatek.c16 #include <linux/usb/role.h>
51 enum usb_role role; member
66 static int mtk_otg_switch_set(struct mtk_glue *glue, enum usb_role role) in mtk_otg_switch_set() argument
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 in mtk_otg_switch_set()
118 musb_usb_role_sx_set(struct usb_role_switch *sw, enum usb_role role) musb_usb_role_sx_set() argument
[all...]
/kernel/linux/linux-6.6/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()
222 cros_ec_usb_power_type_is_wall_wart(unsigned int type, unsigned int role) cros_ec_usb_power_type_is_wall_wart() argument
251 int role, power_type; extcon_cros_ec_detect_cable() local
[all...]

Completed in 17 milliseconds

12345678910>>...16