Lines Matching refs:role
574 if (ci->role != CI_ROLE_END) in ci_irq_handler()
605 enum usb_role role; in ci_usb_role_switch_get() local
609 role = ci_role_to_usb_role(ci); in ci_usb_role_switch_get()
612 return role; in ci_usb_role_switch_get()
616 enum usb_role role) in ci_usb_role_switch_set() argument
621 if (role == USB_ROLE_HOST) { in ci_usb_role_switch_set()
628 } else if (role == USB_ROLE_DEVICE) { in ci_usb_role_switch_set()
650 enum ci_role role; in ci_get_role() local
654 role = ci_otg_role(ci); in ci_get_role()
662 role = CI_ROLE_GADGET; in ci_get_role()
665 role = ci->roles[CI_ROLE_HOST] ? CI_ROLE_HOST in ci_get_role()
669 return role; in ci_get_role()
863 enum ci_role role; in ci_power_lost_work() local
868 role = ci_get_role(ci); in ci_power_lost_work()
870 if (ci->role != role) { in ci_power_lost_work()
872 } else if (role == CI_ROLE_GADGET) { in ci_power_lost_work()
995 if (ci->role != CI_ROLE_END) in role_show()
1005 enum ci_role role; in role_store() local
1013 for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++) in role_store()
1014 if (!strncmp(buf, ci->roles[role]->name, in role_store()
1015 strlen(ci->roles[role]->name))) in role_store()
1018 if (role == CI_ROLE_END) in role_store()
1023 if (role == ci->role) { in role_store()
1031 ret = ci_role_start(ci, role); in role_store()
1032 if (!ret && ci->role == CI_ROLE_GADGET) in role_store()
1040 static DEVICE_ATTR_RW(role);
1206 ci->role = ci_get_role(ci); in ci_hdrc_probe()
1209 if (ci->role == CI_ROLE_GADGET) { in ci_hdrc_probe()
1215 ret = ci_role_start(ci, ci->role); in ci_hdrc_probe()
1410 if (ci->role != CI_ROLE_END && ci_role(ci)->suspend) in ci_suspend()
1453 if (ci->role != CI_ROLE_END && ci_role(ci)->resume) in ci_resume()