Lines Matching refs:role
151 pd_control.role = USB_PD_CTRL_ROLE_NO_CHANGE; in cros_ec_usb_get_role()
165 return resp.role; in cros_ec_usb_get_role()
187 static const char *cros_ec_usb_role_string(unsigned int role) in cros_ec_usb_role_string() argument
189 return role == DR_NONE ? "DISCONNECTED" : in cros_ec_usb_role_string()
190 (role == DR_HOST ? "DFP" : "UFP"); in cros_ec_usb_role_string()
222 unsigned int role) in cros_ec_usb_power_type_is_wall_wart() argument
250 int role, power_type; in extcon_cros_ec_detect_cable() local
265 role = cros_ec_usb_get_role(info, &polarity); in extcon_cros_ec_detect_cable()
266 if (role < 0) { in extcon_cros_ec_detect_cable()
267 if (role != -ENOTCONN) { in extcon_cros_ec_detect_cable()
268 dev_err(dev, "failed getting role err = %d\n", role); in extcon_cros_ec_detect_cable()
269 return role; in extcon_cros_ec_detect_cable()
275 dr = (role & PD_CTRL_RESP_ROLE_DATA) ? DR_HOST : DR_DEVICE; in extcon_cros_ec_detect_cable()
276 pr = (role & PD_CTRL_RESP_ROLE_POWER); in extcon_cros_ec_detect_cable()
287 role, power_type, dr, pr, polarity, mux, dp, hpd); in extcon_cros_ec_detect_cable()
295 cros_ec_usb_power_type_is_wall_wart(power_type, role)) in extcon_cros_ec_detect_cable()