summaryrefslogtreecommitdiff
path: root/drivers/soundwire/bus.c
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2019-08-29 19:35:12 +0300
committerVinod Koul <vkoul@kernel.org>2019-09-04 10:42:31 +0300
commita2e484585ad306aa8ac84140ef54d722ac8f45df (patch)
treea5bcd61ec37ca21e2a3bdfba6774edb3513f7672 /drivers/soundwire/bus.c
parentdd4689e2b6414a2085a7327d8cf54ef535fcaadc (diff)
downloadlinux-a2e484585ad306aa8ac84140ef54d722ac8f45df.tar.xz
soundwire: core: add device tree support for slave devices
This patch adds support to parsing device tree based SoundWire slave devices. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20190829163514.11221-3-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/bus.c')
-rw-r--r--drivers/soundwire/bus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 1dc19a37e9cc..fc53dbe57f85 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -79,6 +79,8 @@ int sdw_add_bus_master(struct sdw_bus *bus)
*/
if (IS_ENABLED(CONFIG_ACPI) && ACPI_HANDLE(bus->dev))
ret = sdw_acpi_find_slaves(bus);
+ else if (IS_ENABLED(CONFIG_OF) && bus->dev->of_node)
+ ret = sdw_of_find_slaves(bus);
else
ret = -ENOTSUPP; /* No ACPI/DT so error out */