summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBard Liao <yung-chuan.liao@linux.intel.com>2024-12-18 16:01:44 +0800
committerVinod Koul <vkoul@kernel.org>2024-12-23 12:00:33 +0530
commitb6a2e1be7d9303d07eff72a13132a37e035fbcfa (patch)
tree3a9304b3b4b2700f0c5cc302574f68cf689ac9ed
parent7533d0df69452c3e7b69c727c1e8e1a7e1afc83c (diff)
soundwire: add lane_used_bandwidth in struct sdw_bus
To support multi-lane, we need to know how much bandwidth is used on each lane. And to use the lane that has enough bandwidth. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--include/linux/soundwire/sdw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
index bb4e33a4db170..ae38ac848d383 100644
--- a/include/linux/soundwire/sdw.h
+++ b/include/linux/soundwire/sdw.h
@@ -893,6 +893,7 @@ struct sdw_master_ops {
* @multi_link: Store bus property that indicates if multi links
* are supported. This flag is populated by drivers after reading
* appropriate firmware (ACPI/DT).
+ * @lane_used_bandwidth: how much bandwidth in bits per second is used by each lane
*/
struct sdw_bus {
struct device *dev;
@@ -924,6 +925,7 @@ struct sdw_bus {
struct dentry *debugfs;
#endif
bool multi_link;
+ unsigned int lane_used_bandwidth[SDW_MAX_LANES];
};
int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,