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 || role == ci->role) in role_store()
993 ret = ci_role_start(ci, role); in role_store()
994 if (!ret && ci->role == CI_ROLE_GADGET) in role_store()
1001 static DEVICE_ATTR_RW(role);
1161 ci->role = ci_get_role(ci); in ci_hdrc_probe()
1164 if (ci->role == CI_ROLE_GADGET) { in ci_hdrc_probe()
1170 ret = ci_role_start(ci, ci->role); in ci_hdrc_probe()
1368 if (ci->role != CI_ROLE_END && ci_role(ci)->suspend) in ci_suspend()
1386 enum ci_role role; in ci_handle_power_lost() local
1390 role = ci_get_role(ci); in ci_handle_power_lost()
1392 if (ci->role != role) { in ci_handle_power_lost()
1394 } else if (role == CI_ROLE_GADGET) { in ci_handle_power_lost()
1430 if (ci->role != CI_ROLE_END && ci_role(ci)->resume) in ci_resume()