diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-10-17 11:09:32 -0500 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-11-24 12:24:37 +0530 |
commit | 6543ac13c623f906200dfd3f1c407d8d333b6995 (patch) | |
tree | 02fa9d56c46f6a30c418e137ddc6dcf47e6b70b5 /drivers/soundwire/debugfs.c | |
parent | 21f4c443731fdb064c0dd31a743aafd0b075156c (diff) | |
download | linux-6543ac13c623f906200dfd3f1c407d8d333b6995.tar.gz linux-6543ac13c623f906200dfd3f1c407d8d333b6995.tar.bz2 linux-6543ac13c623f906200dfd3f1c407d8d333b6995.zip |
soundwire: bus: introduce controller_id
The existing SoundWire support misses a clear Controller/Manager
hiearchical definition to deal with all variants across SOC vendors.
a) Intel platforms have one controller with 4 or more Managers.
b) AMD platforms have two controllers with one Manager each, but due
to BIOS issues use two different link_id values within the scope of a
single controller.
c) QCOM platforms have one or more controller with one Manager each.
This patch adds a 'controller_id' which can be set by higher
levels. If assigned to -1, the controller_id will be set to the
system-unique IDA-assigned bus->id.
The main change is that the bus->id is no longer used for any device
name, which makes the definition completely predictable and not
dependent on any enumeration order. The bus->id is only used to insert
the Managers in the stream rt context.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/stable/20231017160933.12624-2-pierre-louis.bossart%40linux.intel.com
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20231017160933.12624-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/debugfs.c')
-rw-r--r-- | drivers/soundwire/debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c index d1553cb77187..67abd7e52f09 100644 --- a/drivers/soundwire/debugfs.c +++ b/drivers/soundwire/debugfs.c @@ -20,7 +20,7 @@ void sdw_bus_debugfs_init(struct sdw_bus *bus) return; /* create the debugfs master-N */ - snprintf(name, sizeof(name), "master-%d-%d", bus->id, bus->link_id); + snprintf(name, sizeof(name), "master-%d-%d", bus->controller_id, bus->link_id); bus->debugfs = debugfs_create_dir(name, sdw_debugfs_root); } |