Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions drivers/soundwire/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,14 +1069,23 @@ static int sdw_slave_port_config(struct sdw_slave *slave,

i = 0;
list_for_each_entry(p_rt, &s_rt->port_list, port_node) {
/*
* TODO: Check valid port range as defined by DisCo/
* slave
*/
if (!is_bpt_stream) {
ret = sdw_slave_port_is_valid_range(&slave->dev, port_config[i].num);
if (ret < 0)
return ret;

/*
* A port in the generic valid range may still be unsupported by
* the Slave or unavailable for the requested stream direction.
*/
if (!sdw_get_slave_dpn_prop(slave, s_rt->direction,
port_config[i].num)) {
dev_err(&slave->dev,
"port %u not supported for %s\n",
port_config[i].num,
s_rt->direction == SDW_DATA_DIR_TX ? "TX" : "RX");
return -EINVAL;
}
} else if (port_config[i].num) {
return -EINVAL;
}
Expand Down