Lines Matching refs:role

566 	if (ci->role != CI_ROLE_END)  in ci_irq_handler()
597 enum usb_role role; in ci_usb_role_switch_get() local
601 role = ci_role_to_usb_role(ci); in ci_usb_role_switch_get()
604 return role; in ci_usb_role_switch_get()
608 enum usb_role role) in ci_usb_role_switch_set() argument
613 if (role == USB_ROLE_HOST) { in ci_usb_role_switch_set()
620 } else if (role == USB_ROLE_DEVICE) { in ci_usb_role_switch_set()
642 enum ci_role role; in ci_get_role() local
646 role = ci_otg_role(ci); in ci_get_role()
654 role = CI_ROLE_GADGET; in ci_get_role()
657 role = ci->roles[CI_ROLE_HOST] ? CI_ROLE_HOST in ci_get_role()
661 return role; in ci_get_role()
964 if (ci->role != CI_ROLE_END) in role_show()
974 enum ci_role role; in role_store() local
982 for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++) in role_store()
983 if (!strncmp(buf, ci->roles[role]->name, in role_store()
984 strlen(ci->roles[role]->name))) in role_store()
987 if (role == CI_ROLE_END) in role_store()
992 if (role == ci->role) { in role_store()
1000 ret = ci_role_start(ci, role); in role_store()
1001 if (!ret && ci->role == CI_ROLE_GADGET) in role_store()
1009 static DEVICE_ATTR_RW(role);
1171 ci->role = ci_get_role(ci); in ci_hdrc_probe()
1174 if (ci->role == CI_ROLE_GADGET) { in ci_hdrc_probe()
1180 ret = ci_role_start(ci, ci->role); in ci_hdrc_probe()
1376 if (ci->role != CI_ROLE_END && ci_role(ci)->suspend) in ci_suspend()
1394 enum ci_role role; in ci_handle_power_lost() local
1398 role = ci_get_role(ci); in ci_handle_power_lost()
1400 if (ci->role != role) { in ci_handle_power_lost()
1402 } else if (role == CI_ROLE_GADGET) { in ci_handle_power_lost()
1438 if (ci->role != CI_ROLE_END && ci_role(ci)->resume) in ci_resume()