Lines Matching full:dr_mode
86 enum usb_dr_mode dr_mode; in cdns_core_init_role() local
89 dr_mode = usb_get_dr_mode(dev); in cdns_core_init_role()
97 if (dr_mode == USB_DR_MODE_UNKNOWN) { in cdns_core_init_role()
101 dr_mode = USB_DR_MODE_OTG; in cdns_core_init_role()
103 dr_mode = USB_DR_MODE_HOST; in cdns_core_init_role()
105 dr_mode = USB_DR_MODE_PERIPHERAL; in cdns_core_init_role()
109 dr_mode = USB_DR_MODE_OTG; in cdns_core_init_role()
111 dr_mode = USB_DR_MODE_HOST; in cdns_core_init_role()
113 dr_mode = USB_DR_MODE_PERIPHERAL; in cdns_core_init_role()
118 * At this point cdns->dr_mode contains strap configuration. in cdns_core_init_role()
121 best_dr_mode = cdns->dr_mode; in cdns_core_init_role()
127 if (dr_mode == USB_DR_MODE_OTG) { in cdns_core_init_role()
128 best_dr_mode = cdns->dr_mode; in cdns_core_init_role()
129 } else if (cdns->dr_mode == USB_DR_MODE_OTG) { in cdns_core_init_role()
130 best_dr_mode = dr_mode; in cdns_core_init_role()
131 } else if (cdns->dr_mode != dr_mode) { in cdns_core_init_role()
136 dr_mode = best_dr_mode; in cdns_core_init_role()
138 if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_HOST) { in cdns_core_init_role()
154 if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_PERIPHERAL) { in cdns_core_init_role()
167 cdns->dr_mode = dr_mode; in cdns_core_init_role()
178 switch (cdns->dr_mode) { in cdns_core_init_role()
216 if (cdns->dr_mode != USB_DR_MODE_OTG) { in cdns_hw_role_state_machine()
367 if (cdns->dr_mode == USB_DR_MODE_HOST) { in cdns_role_set()
377 if (cdns->dr_mode == USB_DR_MODE_PERIPHERAL) { in cdns_role_set()