Lines Matching refs:role
564 if (ci->role != CI_ROLE_END) in ci_irq_handler()
595 enum usb_role role; in ci_usb_role_switch_get() local
599 role = ci_role_to_usb_role(ci); in ci_usb_role_switch_get()
602 return role; in ci_usb_role_switch_get()
606 enum usb_role role) in ci_usb_role_switch_set() argument
611 enum ci_role ci_role = usb_role_to_ci_role(role); in ci_usb_role_switch_set()
615 (current_role == role)) in ci_usb_role_switch_set()
631 if (ci->wq && role != USB_ROLE_NONE) in ci_usb_role_switch_set()
639 if (role == USB_ROLE_DEVICE) in ci_usb_role_switch_set()
641 else if (role == USB_ROLE_HOST) in ci_usb_role_switch_set()
954 if (ci->role != CI_ROLE_END) in role_show()
964 enum ci_role role; in role_store() local
972 for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++) in role_store()
973 if (!strncmp(buf, ci->roles[role]->name, in role_store()
974 strlen(ci->roles[role]->name))) in role_store()
977 if (role == CI_ROLE_END || role == ci->role) in role_store()
983 ret = ci_role_start(ci, role); in role_store()
984 if (!ret && ci->role == CI_ROLE_GADGET) in role_store()
991 static DEVICE_ATTR_RW(role);
1153 ci->role = ci_otg_role(ci); in ci_hdrc_probe()
1162 ci->role = CI_ROLE_GADGET; in ci_hdrc_probe()
1165 ci->role = ci->roles[CI_ROLE_HOST] in ci_hdrc_probe()
1172 if (ci->role == CI_ROLE_GADGET) { in ci_hdrc_probe()
1178 ret = ci_role_start(ci, ci->role); in ci_hdrc_probe()