Lines Matching refs:role
3 * 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)
79 if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) ||
80 (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL))
86 if (role == USB_ROLE_NONE && hsotg->test_mode) {
95 * If role-switch set is called before the udc_start, we need to enable
108 if (role == USB_ROLE_HOST) {
110 } else if (role == USB_ROLE_DEVICE) {
130 dwc2_force_mode(hsotg, role == USB_ROLE_HOST);
136 role == USB_ROLE_NONE ? "No" :
137 role == USB_ROLE_HOST ? "A" : "B");
148 if (!device_property_read_bool(hsotg->dev, "usb-role-switch"))
160 "failed to register role switch: %d\n", ret);