Home
last modified time | relevance | path

Searched full:role (Results 1 – 25 of 570) sorted by relevance

12345678910>>...23

/linux/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...]
H A Dcore.h15 #include <linux/usb/role.h>
20 * struct cdns_role_driver - host/gadget role driver
21 * @start: start this role
22 * @stop: stop this role
23 * @suspend: suspend callback for this role
24 * @resume: resume callback for this role
25 * @irq: irq handler for this role
26 * @name: role name string (host/gadget)
66 * @role: current role
76 * @role_sw: pointer to role switch object.
[all …]
H A DKconfig8 dual-role controller.
9 It supports: dual-role switch, Host-only, and Peripheral-only.
17 tristate "Cadence USB3 Dual-Role Controller"
20 Say Y here if your system has a Cadence USB3 dual-role controller.
21 It supports: dual-role switch, Host-only, and Peripheral-only.
97 tristate "Cadence CDNSP Dual-Role Controller"
100 Say Y here if your system has a Cadence CDNSP dual-role controller.
101 It supports: dual-role switch Host-only, and Peripheral-only.
/linux/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 = USB_ROLE_HOST; in dwc2_drd_role_sw_set()
[all …]
H A DKconfig10 Say Y here if your system has a Dual Role Hi-Speed USB
18 dwc2_platform.ko. For all modes(host, gadget and dual-role), there
37 comment "Gadget/Dual-role mode requires USB Gadget support to be enabled"
49 bool "Dual Role mode"
52 Select this option if you want the driver to work in a dual-role
54 the role will be determined by the cable that gets plugged-in. This
/linux/Documentation/devicetree/bindings/usb/
H A Dmediatek,mtu3.yaml104 Regulator of USB VBUS5v, needed when supports dual-role mode.
132 when supports dual-role mode.
134 new bindings, and use "usb-role-switch" property instead.
136 usb-role-switch:
138 description: Support role switch.
141 role-switch-default-mode:
148 Connector for dual role switch, especially for "gpio-usb-b-connector"
154 using the OF graph bindings specified, if the "usb-role-switch"
161 supports manual dual-role switch via debugfs; usually used when
162 receptacle is TYPE-A and also wants to support dual-role mode.
[all …]
H A Dusb-drd.yaml25 Tells Dual-Role USB controllers that we want to work on a particular
51 usb-role-switch:
53 Indicates that the device is capable of assigning the USB data role
57 role-switch-default-mode:
59 Indicates if usb-role-switch is enabled, the device default operation
60 mode of controller while usb role is USB_ROLE_NONE.
H A Dmediatek,musb.yaml50 usb-role-switch:
52 description: Support role switch. See usb/generic.txt
67 description: Connector for dual role switch
71 usb-role-switch: [ connector ]
72 connector: [ usb-role-switch ]
106 usb-role-switch;
/linux/include/linux/usb/
H A Drole.h17 enum usb_role role);
21 * struct usb_role_switch_desc - USB Role Switch Descriptor
22 * @fwnode: The device node to be associated with the role switch
26 * @set: Callback for setting the role
27 * @get: Callback for getting the role (optional)
28 * @allow_userspace_control: If true userspace may change the role through sysfs
33 * device controller behind the USB connector with the role switch. If
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
[all …]
/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
[all …]
H A Dextcon-axp288.c22 #include <linux/usb/role.h>
153 * The below code to control the USB role-switch on devices with an AXP288
155 * to control the USB role-switch on such devices:
156 * 1) On many devices the USB role is controlled by AML code, but the AML code
161 * 2) In order for our BC1.2 charger detection to work properly the role
168 enum usb_role role; in axp288_get_id_pin() local
174 role = usb_role_switch_get_role(info->role_sw); in axp288_get_id_pin()
175 return role != USB_ROLE_HOST; in axp288_get_id_pin()
182 enum usb_role role; in axp288_usb_role_work() local
188 role = USB_ROLE_HOST; in axp288_usb_role_work()
[all …]
/linux/drivers/usb/roles/
H A DKconfig4 tristate "USB Role Switch Support"
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
19 tristate "Intel XHCI USB Role Switch"
22 Driver for the internal USB role switch for switching the USB data
27 be called intel-xhci-usb-role-switch.
/linux/net/bridge/
H A Dbr_mrp.c270 * - 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
630 switch (role) { in br_mrp_set_port_role()
[all …]
H A Dbr_mrp_netlink.c109 enum br_mrp_port_role_type role; in br_mrp_port_role_parse() local
118 NL_SET_ERR_MSG_MOD(extack, "Missing attribute: ROLE"); in br_mrp_port_role_parse()
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
183 "Missing attribute: RING_ID or ROLE"); in br_mrp_ring_role_parse()
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()
[all …]
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()
/linux/drivers/usb/chipidea/
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()
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()
183 * vbus disconnect event is lost due to role in ci_handle_id_switch()
190 if (role == CI_ROLE_GADGET && in ci_handle_id_switch()
[all …]
/linux/drivers/misc/
H A Dhisi_hikey_usb.c21 #include <linux/usb/role.h>
43 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()
151 if (!device_property_read_bool(dev, "usb-role-switch")) in hisi_hikey_usb_of_role_switch()
183 dev_err(dev, "get device role switch failed with error %ld\n", in hisi_hikey_usb_of_role_switch()
[all …]
/linux/Documentation/ABI/testing/
H A Dsysfs-class-usb_role5 Place in sysfs for USB Role Switches. USB Role Switch is a
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/Documentation/virt/kvm/x86/
H A Dmmu.rst151 role.level:
154 role.direct:
159 by role.level (2MB for first level, 1GB for second level, 0.5TB for third
163 role.quadrant:
164 When role.has_4_byte_gpte=1, the guest uses 32-bit gptes while the host uses 64-bit
167 For first-level shadow pages, role.quadrant can be 0 or 1 and denotes the
171 shadow pages) so role.quadrant takes values in the range 0..3. Each
173 role.access:
176 role.invalid:
180 role.has_4_byte_gpte:
[all …]
/linux/Documentation/gpu/amdgpu/display/
H A Ddcn3_cm_drm_current.svg679 sodipodi:role="line"
689 sodipodi:role="line"
699 sodipodi:role="line"
709 sodipodi:role="line"
719 sodipodi:role="line"
730 sodipodi:role="line"
741 sodipodi:role="line"
752 sodipodi:role="line"
763 sodipodi:role="line"
774 sodipodi:role="line"
[all …]
H A Ddcn2_cm_drm_current.svg618 sodipodi:role="line"
628 sodipodi:role="line"
638 sodipodi:role="line"
648 sodipodi:role="line"
658 sodipodi:role="line"
669 sodipodi:role="line"
680 sodipodi:role="line"
691 sodipodi:role="line"
702 sodipodi:role="line"
713 sodipodi:role="line"
[all …]
/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/arch/x86/kvm/mmu/
H A 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.has_4_byte_gpte ? 4 : 8, \
39 role.quadrant, \
40 role.direct ? " direct" : "", \
41 access_str[role.access], \
42 role.invalid ? " invalid" : "", \
[all …]
/linux/drivers/usb/musb/
H A DKconfig3 # USB Dual Role (OTG-ready) Controller Drivers
7 # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
9 tristate 'Inventra Highspeed Dual Role Controller'
13 Say Y here if your system has a dual role high speed USB
16 it's being used with, including the USB peripheral role,
17 or the USB host role, or both.
53 bool "Dual Role mode"
/linux/drivers/usb/dwc3/
H A Ddrd.c3 * drd.c - DesignWare USB3 DRD Controller Dual-role support
220 * We don't want SRP/HNP for simple dual-role so leave in dwc3_otg_host_init()
227 * We don't want HNP/role-swap so leave these disabled. in dwc3_otg_host_init()
275 * but we keep them 0 for simple dual-role operation. in dwc3_otg_device_init()
339 /* don't do anything if debug user changed role to not OTG */ in dwc3_otg_update()
447 enum usb_role role) in dwc3_usb_role_switch_set() argument
452 switch (role) { in dwc3_usb_role_switch_set()
475 enum usb_role role; in dwc3_usb_role_switch_get() local
480 role = USB_ROLE_HOST; in dwc3_usb_role_switch_get()
483 role = USB_ROLE_DEVICE; in dwc3_usb_role_switch_get()
[all …]

12345678910>>...23