History

soundwire: intel: report slave_ids for each link to SOF driver

The existing link_mask flag is no longer sufficient to detect the hardware and identify which topology file and a machine driver to load. By reporting the slave_ids exposed in ACPI tables, the parent SOF driver will be able to compare against a set of static configurations. This patch only adds the interface change, the functionality is added in future patches.

Bard Liao committed 6 years ago

Commit 92f622b1 parent 09f6a721 file · +11 −0Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/soundwire/sdw_intel.h+11−0
@@ -5,6 +5,7 @@ · 4 unmodified lines
55 #define __SDW_INTEL_H
66
77 #include <linux/irqreturn.h>
8+#include <linux/soundwire/sdw.h>
89
910 /**
1011 * struct sdw_intel_stream_params_data: configuration passed during
@@ -93,6 +94,11 @@ struct sdw_intel_link_res; · 82 unmodified lines
9394 */
9495 #define SDW_INTEL_CLK_STOP_BUS_RESET BIT(3)
9596
97+struct sdw_intel_slave_id {
98+ int link_id;
99+ struct sdw_slave_id id;
100+};
101+
96102 /**
97103 * struct sdw_intel_ctx - context allocated by the controller
98104 * driver probe
@@ -101,9 +107,12 @@ struct sdw_intel_link_res; · 2 unmodified lines
101107 * hardware capabilities after all power dependencies are settled.
102108 * @link_mask: bit-wise mask listing SoundWire links reported by the
103109 * Controller
110+ * @num_slaves: total number of devices exposed across all enabled links
104111 * @handle: ACPI parent handle
105112 * @links: information for each link (controller-specific and kept
106113 * opaque here)
114+ * @ids: array of slave_id, representing Slaves exposed across all enabled
115+ * links
107116 * @link_list: list to handle interrupts across all links
108117 * @shim_lock: mutex to handle concurrent rmw access to shared SHIM registers.
109118 */
@@ -111,8 +120,10 @@ struct sdw_intel_ctx { · 1 unmodified line
111120 int count;
112121 void __iomem *mmio_base;
113122 u32 link_mask;
123+ int num_slaves;
114124 acpi_handle handle;
115125 struct sdw_intel_link_res *links;
126+ struct sdw_intel_slave_id *ids;
116127 struct list_head link_list;
117128 struct mutex shim_lock; /* lock for access to shared SHIM registers */
118129 };