diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-08-31 15:43:17 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-03 12:32:29 +0200 |
commit | 63642595a78da42f841fabcc3f309f4c1362dc40 (patch) | |
tree | 8a7ef8875ac2fb7f00b92e0bb82bb0c96c22e346 /include | |
parent | ASoC: codecs: soundwire: remove port_ready[] usage from codecs. (diff) | |
download | linux-63642595a78da42f841fabcc3f309f4c1362dc40.tar.xz linux-63642595a78da42f841fabcc3f309f4c1362dc40.zip |
soundwire: add definition for maximum number of ports
A Device may have at most 15 physical ports (DP0, DP1..DP14).
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200831134318.11443-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/soundwire/sdw.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 76052f12c9f7..0aa4c6af7554 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -38,7 +38,8 @@ struct sdw_slave; #define SDW_FRAME_CTRL_BITS 48 #define SDW_MAX_DEVICES 11 -#define SDW_VALID_PORT_RANGE(n) ((n) <= 14 && (n) >= 1) +#define SDW_MAX_PORTS 15 +#define SDW_VALID_PORT_RANGE(n) ((n) < SDW_MAX_PORTS && (n) >= 1) enum { SDW_PORT_DIRN_SINK = 0, |