menuconfig SOUNDWIRE
        tristate "SoundWire support"
        depends on ACPI || OF
+       depends on SND_SOC_SDCA_OPTIONAL
        help
          SoundWire is a 2-Pin interface with data and clock line ratified
          by the MIPI Alliance. SoundWire is used for transporting data
 
 #include <linux/of.h>
 #include <linux/soundwire/sdw.h>
 #include <linux/soundwire/sdw_type.h>
+#include <sound/sdca.h>
 #include "bus.h"
 #include "sysfs_local.h"
 
        list_add_tail(&slave->node, &bus->slaves);
        mutex_unlock(&bus->bus_lock);
 
+       /*
+        * The Soundwire driver probe may optionally register SDCA
+        * sub-devices, one per Function. This means the information
+        * on the SDCA revision and the number/type of Functions need
+        * to be extracted from platform firmware before the SoundWire
+        * driver probe, and as a consequence before the SoundWire
+        * device_register() below.
+        */
+       sdca_lookup_interface_revision(slave);
+       sdca_lookup_functions(slave);
+
        ret = device_register(&slave->dev);
        if (ret) {
                dev_err(bus->dev, "Failed to add slave: ret %d\n", ret);
 
        return 0;
 }
+
+MODULE_IMPORT_NS(SND_SOC_SDCA);