Lines Matching defs:role
31 * UCSI_SWAP_TIMEOUT_MS - Timeout for role swap requests
615 enum typec_role role, int is_partner,
625 !is_source(role)))
632 command |= is_source(role) ? UCSI_GET_PDOS_SRC_PDOS : 0;
641 static int ucsi_get_pdos(struct ucsi_connector *con, enum typec_role role,
648 ret = ucsi_read_pdos(con, role, is_partner, pdos, 0, UCSI_MAX_PDOS);
657 ret = ucsi_read_pdos(con, role, is_partner, pdos, UCSI_MAX_PDOS,
681 enum typec_role role,
687 ret = ucsi_get_pdos(con, role, is_partner, pd_caps.pdo);
694 pd_caps.role = role;
1084 dev_err(con->ucsi->dev, "con:%d: failed to set usb role:%d\n",
1183 enum typec_role role;
1205 role = !!(con->status.flags & UCSI_CONSTAT_PWR_DIR);
1208 typec_set_pwr_role(con->port, role);
1210 /* Complete pending power role swap */
1216 typec_set_pwr_role(con->port, role);
1244 /* Complete pending data role swap */
1386 static int ucsi_dr_swap(struct typec_port *port, enum typec_data_role role)
1402 role == TYPEC_DEVICE) ||
1404 role == TYPEC_HOST))
1410 command |= UCSI_SET_UOR_ROLE(role);
1430 static int ucsi_pr_swap(struct typec_port *port, enum typec_role role)
1446 if (cur_role == role)
1452 command |= UCSI_SET_PDR_ROLE(role);
1466 /* Something has gone wrong while swapping the role */
1524 "con%d: failed to get usb role switch\n", con->num);
1637 dev_err(ucsi->dev, "con:%d: failed to set usb role:%d\n",