Lines Matching full:role
19 #include <linux/usb/role.h>
65 static void switch_usb2_role(struct dwc3_rtk *rtk, enum usb_role role) in switch_usb2_role() argument
73 switch (role) { in switch_usb2_role()
81 dev_dbg(rtk->dev, "%s: role=%d\n", __func__, role); in switch_usb2_role()
86 static void switch_dwc3_role(struct dwc3_rtk *rtk, enum usb_role role) in switch_dwc3_role() argument
91 usb_role_switch_set_role(rtk->dwc->role_sw, role); in switch_dwc3_role()
96 enum usb_role role; in dwc3_rtk_get_role() local
98 role = rtk->cur_role; in dwc3_rtk_get_role()
101 role = usb_role_switch_get_role(rtk->dwc->role_sw); in dwc3_rtk_get_role()
103 dev_dbg(rtk->dev, "%s not usb_role_switch role=%d\n", __func__, role); in dwc3_rtk_get_role()
105 return role; in dwc3_rtk_get_role()
108 static void dwc3_rtk_set_role(struct dwc3_rtk *rtk, enum usb_role role) in dwc3_rtk_set_role() argument
110 rtk->cur_role = role; in dwc3_rtk_set_role()
112 switch_dwc3_role(rtk, role); in dwc3_rtk_set_role()
114 switch_usb2_role(rtk, role); in dwc3_rtk_set_role()
118 static int dwc3_usb_role_switch_set(struct usb_role_switch *sw, enum usb_role role) in dwc3_usb_role_switch_set() argument
122 dwc3_rtk_set_role(rtk, role); in dwc3_usb_role_switch_set()
332 if (device_property_read_bool(dwc3_dev, "usb-role-switch")) { in dwc3_rtk_probe_dwc3_core()