Lines Matching refs:role
214 enum ci_role role; member
264 BUG_ON(ci->role >= CI_ROLE_END || !ci->roles[ci->role]); in ci_role()
265 return ci->roles[ci->role]; in ci_role()
268 static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role) in ci_role_start() argument
272 if (role >= CI_ROLE_END) in ci_role_start()
275 if (!ci->roles[role]) in ci_role_start()
278 ret = ci->roles[role]->start(ci); in ci_role_start()
280 ci->role = role; in ci_role_start()
286 enum ci_role role = ci->role; in ci_role_stop() local
288 if (role == CI_ROLE_END) in ci_role_stop()
291 ci->role = CI_ROLE_END; in ci_role_stop()
293 ci->roles[role]->stop(ci); in ci_role_stop()
298 if (ci->role == CI_ROLE_HOST) in ci_role_to_usb_role()
300 else if (ci->role == CI_ROLE_GADGET && ci->vbus_active) in ci_role_to_usb_role()
306 static inline enum ci_role usb_role_to_ci_role(enum usb_role role) in usb_role_to_ci_role() argument
308 if (role == USB_ROLE_HOST) in usb_role_to_ci_role()
310 else if (role == USB_ROLE_DEVICE) in usb_role_to_ci_role()