TYPEC_SINK
typec_set_pwr_role(type_c->port, TYPEC_SINK);
pwr_role = TYPEC_SINK;
pwr_role = TYPEC_SINK;
pwr_role = TYPEC_SINK;
pwr_role = TYPEC_SINK;
caps_desc.role = TYPEC_SINK;
role = resp.role & PD_CTRL_RESP_ROLE_POWER ? TYPEC_SOURCE : TYPEC_SINK;
typec_set_pwr_role(port, resp->role ? TYPEC_SOURCE : TYPEC_SINK);
TYPEC_SOURCE : TYPEC_SINK);
TYPEC_SOURCE : TYPEC_SINK);
TYPEC_SINK;
ctx->typec.vconn_role = (ret & VCONN_STATUS) ? TYPEC_SOURCE : TYPEC_SINK;
ctx->typec.power_role = (ret & SINK_STATUS) ? TYPEC_SINK : TYPEC_SOURCE;
ret = (int_status & SINK_STATUS) ? TYPEC_SINK : TYPEC_SOURCE;
[TYPEC_SINK] = "sink",
port->pwr_role = TYPEC_SINK;
port->vconn_role = TYPEC_SINK;
port->pwr_role = TYPEC_SINK;
case TYPEC_SINK:
[TYPEC_SINK] = "sink-capabilities",
return TYPEC_SINK;
chip->capability.prefer_role = TYPEC_SINK;
[TYPEC_SINK] = "Sink",
port->vconn_role = enable ? TYPEC_SOURCE : TYPEC_SINK;
if (role == TYPEC_SINK)
if (role == TYPEC_SINK)
pdo = tcpm_forge_legacy_pdo(port, port->snk_pdo[i], TYPEC_SINK);
caps.role = TYPEC_SINK;
port->vconn_role = TYPEC_SINK;
TYPEC_SINK, tcpm_data_role_for_sink(port));
role = tcpm_port_is_sink(port) ? TYPEC_SINK : TYPEC_SOURCE;
tcpm_set_roles(port, port->self_powered, TYPEC_STATE_USB, TYPEC_SINK,
tcpm_set_pwr_role(port, TYPEC_SINK);
if (tcpm_port_is_disconnected(port) && !(port->pwr_role == TYPEC_SINK &&
if (port->pwr_role == TYPEC_SINK && port->attached)
if (port->pwr_role == TYPEC_SINK && port->auto_vbus_discharge_enabled)
((port)->try_snk_count == 0 && (port)->try_role == TYPEC_SINK && \
if (port->try_role == TYPEC_SINK)
if (!(port->pwr_role == TYPEC_SINK &&
port->pd_list[i]->sink_desc.role = TYPEC_SINK;
const char *cmd = (role == TYPEC_SINK) ? "SWSk" : "SWSr";
if (UCSI_CONSTAT(con, PWR_DIR) != TYPEC_SINK) {
bool is_sink = UCSI_CONSTAT(con, PWR_DIR) == TYPEC_SINK;
(UCSI_CONSTAT(con, PWR_DIR) == TYPEC_SINK))
pd_cap = ucsi_get_pd_caps(con, TYPEC_SINK, false);
cap = ucsi_get_pd_caps(con, TYPEC_SINK, true);
return TYPEC_SINK;
return TYPEC_SINK;
case TYPEC_SINK:
pwr_role = TYPEC_SINK;
return role == TYPEC_SINK;