Lines Matching refs:role
152 pd_control.role = USB_PD_CTRL_ROLE_NO_CHANGE; in cros_ec_usb_get_role()
166 return resp.role; in cros_ec_usb_get_role()
188 static const char *cros_ec_usb_role_string(unsigned int role) in cros_ec_usb_role_string() argument
190 return role == DR_NONE ? "DISCONNECTED" : in cros_ec_usb_role_string()
191 (role == DR_HOST ? "DFP" : "UFP"); in cros_ec_usb_role_string()
223 unsigned int role) in cros_ec_usb_power_type_is_wall_wart() argument
251 int role, power_type; in extcon_cros_ec_detect_cable() local
266 role = cros_ec_usb_get_role(info, &polarity); in extcon_cros_ec_detect_cable()
267 if (role < 0) { in extcon_cros_ec_detect_cable()
268 if (role != -ENOTCONN) { in extcon_cros_ec_detect_cable()
269 dev_err(dev, "failed getting role err = %d\n", role); in extcon_cros_ec_detect_cable()
270 return role; in extcon_cros_ec_detect_cable()
276 dr = (role & PD_CTRL_RESP_ROLE_DATA) ? DR_HOST : DR_DEVICE; in extcon_cros_ec_detect_cable()
277 pr = (role & PD_CTRL_RESP_ROLE_POWER); in extcon_cros_ec_detect_cable()
288 role, power_type, dr, pr, polarity, mux, dp, hpd); in extcon_cros_ec_detect_cable()
296 cros_ec_usb_power_type_is_wall_wart(power_type, role)) in extcon_cros_ec_detect_cable()