Lines Matching full:role
18 #include <linux/usb/role.h>
64 static void switch_usb2_role(struct dwc3_rtk *rtk, enum usb_role role) in switch_usb2_role() argument
72 switch (role) { in switch_usb2_role()
80 dev_dbg(rtk->dev, "%s: role=%d\n", __func__, role); in switch_usb2_role()
85 static void switch_dwc3_role(struct dwc3_rtk *rtk, enum usb_role role) in switch_dwc3_role() argument
90 usb_role_switch_set_role(rtk->dwc->role_sw, role); in switch_dwc3_role()
95 enum usb_role role; in dwc3_rtk_get_role() local
97 role = rtk->cur_role; in dwc3_rtk_get_role()
100 role = usb_role_switch_get_role(rtk->dwc->role_sw); in dwc3_rtk_get_role()
102 dev_dbg(rtk->dev, "%s not usb_role_switch role=%d\n", __func__, role); in dwc3_rtk_get_role()
104 return role; in dwc3_rtk_get_role()
107 static void dwc3_rtk_set_role(struct dwc3_rtk *rtk, enum usb_role role) in dwc3_rtk_set_role() argument
109 rtk->cur_role = role; in dwc3_rtk_set_role()
111 switch_dwc3_role(rtk, role); in dwc3_rtk_set_role()
113 switch_usb2_role(rtk, role); in dwc3_rtk_set_role()
117 static int dwc3_usb_role_switch_set(struct usb_role_switch *sw, enum usb_role role) in dwc3_usb_role_switch_set() argument
121 dwc3_rtk_set_role(rtk, role); in dwc3_usb_role_switch_set()
334 if (device_property_read_bool(dwc3_dev, "usb-role-switch")) { in dwc3_rtk_probe_dwc3_core()