return ret;
}
-static bool yoga_c630_ucsi_update_altmodes(struct ucsi *ucsi,
- u8 recipient,
- struct ucsi_altmode *orig,
- struct ucsi_altmode *updated)
-{
- int i;
-
- if (orig[0].svid == 0 || recipient != UCSI_RECIPIENT_SOP)
- return false;
-
- /* EC is nice and repeats altmodes again and again. Ignore copies. */
- for (i = 1; i < UCSI_MAX_ALTMODES; i++) {
- if (orig[i].svid == orig[0].svid) {
- dev_dbg(ucsi->dev, "Found duplicate altmodes, starting from %d\n", i);
- memset(&orig[i], 0, (UCSI_MAX_ALTMODES - i) * sizeof(*orig));
- break;
- }
- }
-
- return false;
-}
-
static void yoga_c630_ucsi_update_connector(struct ucsi_connector *con)
{
if (con->num == 1)
.read_message_in = yoga_c630_ucsi_read_message_in,
.sync_control = yoga_c630_ucsi_sync_control,
.async_control = yoga_c630_ucsi_async_control,
- .update_altmodes = yoga_c630_ucsi_update_altmodes,
.update_connector = yoga_c630_ucsi_update_connector,
};