Lines Matching refs:alt

298 static int ucsi_altmode_next_mode(struct typec_altmode **alt, u16 svid)
303 for (i = 0; alt[i]; i++) {
307 if (alt[i]->svid == svid)
314 static int ucsi_next_altmode(struct typec_altmode **alt)
319 if (!alt[i])
325 static int ucsi_get_num_altmode(struct typec_altmode **alt)
330 if (!alt[i])
340 struct typec_altmode *alt;
363 alt = ucsi_register_displayport(con, override, i, desc);
367 alt = typec_port_register_altmode(con->port,
370 alt = ucsi_register_displayport(con, override,
374 alt = typec_port_register_altmode(con->port, desc);
378 if (IS_ERR(alt)) {
379 ret = PTR_ERR(alt);
383 con->port_altmode[i] = alt;
398 alt = typec_partner_register_altmode(con->partner, desc);
399 if (IS_ERR(alt)) {
400 ret = PTR_ERR(alt);
404 con->partner_altmode[i] = alt;
419 alt = typec_plug_register_altmode(con->plug, desc);
420 if (IS_ERR(alt)) {
421 ret = PTR_ERR(alt);
425 con->plug_altmode[i] = alt;
431 trace_ucsi_register_altmode(recipient, alt);
447 struct ucsi_altmode alt;
466 memset(&alt, 0, sizeof(alt));
471 len = ucsi_send_command(con->ucsi, command, &alt, sizeof(alt));
481 if (!len || !alt.svid)
484 orig[k].mid = alt.mid;
485 orig[k].svid = alt.svid;
522 struct ucsi_altmode alt[2];
543 memset(alt, 0, sizeof(alt));
548 len = ucsi_send_command(con->ucsi, command, alt, sizeof(alt));
555 * This code is requesting one alt mode at a time, but some PPMs
556 * may still return two. If that happens both alt modes need be
557 * registered and the offset for the next alt mode has to be
560 num = len / sizeof(alt[0]);
564 if (!alt[j].svid)
568 desc.vdo = alt[j].mid;
569 desc.svid = alt[j].svid;
809 "con%d: failed to register partner alt modes (%d)\n",
1584 dev_err(ucsi->dev, "con%d: failed to register alt modes\n",