Lines Matching full:role

573 	if (ci->role != CI_ROLE_END)  in ci_irq_handler()
604 enum usb_role role; in ci_usb_role_switch_get() local
608 role = ci_role_to_usb_role(ci); in ci_usb_role_switch_get()
611 return role; in ci_usb_role_switch_get()
615 enum usb_role role) in ci_usb_role_switch_set() argument
620 if (role == USB_ROLE_HOST) { in ci_usb_role_switch_set()
627 } else if (role == USB_ROLE_DEVICE) { in ci_usb_role_switch_set()
649 enum ci_role role; in ci_get_role() local
653 role = ci_otg_role(ci); in ci_get_role()
658 * role switch, the defalt role is gadget, and the in ci_get_role()
661 role = CI_ROLE_GADGET; in ci_get_role()
664 role = ci->roles[CI_ROLE_HOST] ? CI_ROLE_HOST in ci_get_role()
668 return role; in ci_get_role()
803 if (device_property_read_bool(dev, "usb-role-switch")) in ci_get_platdata()
862 enum ci_role role; in ci_power_lost_work() local
867 role = ci_get_role(ci); in ci_power_lost_work()
869 if (ci->role != role) { in ci_power_lost_work()
871 } else if (role == CI_ROLE_GADGET) { in ci_power_lost_work()
992 if (ci->role != CI_ROLE_END) in role_show()
1002 enum ci_role role; in role_store() local
1006 dev_warn(dev, "Current configuration is not dual-role, quit\n"); in role_store()
1010 for (role = CI_ROLE_HOST; role < CI_ROLE_END; role++) in role_store()
1011 if (!strncmp(buf, ci->roles[role]->name, in role_store()
1012 strlen(ci->roles[role]->name))) in role_store()
1015 if (role == CI_ROLE_END) in role_store()
1020 if (role == ci->role) { in role_store()
1028 ret = ci_role_start(ci, role); in role_store()
1029 if (!ret && ci->role == CI_ROLE_GADGET) in role_store()
1037 static DEVICE_ATTR_RW(role);
1156 /* initialize role(s) before the interrupt is requested */ in ci_hdrc_probe()
1201 ci->role = ci_get_role(ci); in ci_hdrc_probe()
1204 if (ci->role == CI_ROLE_GADGET) { in ci_hdrc_probe()
1210 ret = ci_role_start(ci, ci->role); in ci_hdrc_probe()
1212 dev_err(dev, "can't start %s role\n", in ci_hdrc_probe()
1405 /* Extra routine per role before system suspend */ in ci_suspend()
1406 if (ci->role != CI_ROLE_END && ci_role(ci)->suspend) in ci_suspend()
1448 /* Extra routine per role after system resume */ in ci_resume()
1449 if (ci->role != CI_ROLE_END && ci_role(ci)->resume) in ci_resume()