Lines Matching full:role
22 #include <linux/usb/role.h>
54 * Role | ID | VBUS
68 enum usb_role role; in usb_conn_detect_cable() local
81 role = USB_ROLE_HOST; in usb_conn_detect_cable()
83 role = USB_ROLE_DEVICE; in usb_conn_detect_cable()
85 role = USB_ROLE_NONE; in usb_conn_detect_cable()
87 dev_dbg(info->dev, "role %s -> %s, gpios: id %d, vbus %d\n", in usb_conn_detect_cable()
88 usb_role_string(info->last_role), usb_role_string(role), id, vbus); in usb_conn_detect_cable()
90 if (!info->initial_detection && info->last_role == role) { in usb_conn_detect_cable()
91 dev_warn(info->dev, "repeated role: %s\n", usb_role_string(role)); in usb_conn_detect_cable()
100 ret = usb_role_switch_set_role(info->role_sw, role); in usb_conn_detect_cable()
102 dev_err(info->dev, "failed to set role: %d\n", ret); in usb_conn_detect_cable()
104 if (role == USB_ROLE_HOST && info->vbus) { in usb_conn_detect_cable()
110 info->last_role = role; in usb_conn_detect_cable()
220 "failed to get role switch\n"); in usb_conn_probe()