Lines Matching +full:usb +full:- +full:role +full:- +full:switch
1 // SPDX-License-Identifier: GPL-2.0
17 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
30 * @name: Name for the switch (optional)
32 * @usb2_port and @usb3_port will point to the USB host port and @udc to the USB
33 * device controller behind the USB connector with the role switch. If
36 * usb_role_switch_register() before registering the switch.
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
83 return ERR_PTR(-ENODEV); in usb_role_switch_get()
89 return ERR_PTR(-ENODEV); in fwnode_usb_role_switch_get()
104 return ERR_PTR(-ENODEV); in usb_role_switch_register()
119 static inline const char *usb_role_string(enum usb_role role) in usb_role_string() argument