Merge tag 'sound-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[linux-2.6-microblaze.git] / sound / soc / codecs / max98373-sdw.c
index c1bd320..fa589d8 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/of.h>
 #include <linux/soundwire/sdw.h>
 #include <linux/soundwire/sdw_type.h>
+#include <linux/soundwire/sdw_registers.h>
 #include "max98373.h"
 #include "max98373-sdw.h"
 
@@ -285,11 +286,13 @@ static const struct dev_pm_ops max98373_pm = {
 static int max98373_read_prop(struct sdw_slave *slave)
 {
        struct sdw_slave_prop *prop = &slave->prop;
-       int nval, i, num_of_ports;
+       int nval, i;
        u32 bit;
        unsigned long addr;
        struct sdw_dpn_prop *dpn;
 
+       prop->scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY;
+
        /* BITMAP: 00001000  Dataport 3 is active */
        prop->source_ports = BIT(3);
        /* BITMAP: 00000010  Dataport 1 is active */
@@ -298,7 +301,6 @@ static int max98373_read_prop(struct sdw_slave *slave)
        prop->clk_stop_timeout = 20;
 
        nval = hweight32(prop->source_ports);
-       num_of_ports = nval;
        prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval,
                                          sizeof(*prop->src_dpn_prop),
                                          GFP_KERNEL);
@@ -318,7 +320,6 @@ static int max98373_read_prop(struct sdw_slave *slave)
 
        /* do this again for sink now */
        nval = hweight32(prop->sink_ports);
-       num_of_ports += nval;
        prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval,
                                           sizeof(*prop->sink_dpn_prop),
                                           GFP_KERNEL);
@@ -336,17 +337,6 @@ static int max98373_read_prop(struct sdw_slave *slave)
                i++;
        }
 
-       /* Allocate port_ready based on num_of_ports */
-       slave->port_ready = devm_kcalloc(&slave->dev, num_of_ports,
-                                        sizeof(*slave->port_ready),
-                                        GFP_KERNEL);
-       if (!slave->port_ready)
-               return -ENOMEM;
-
-       /* Initialize completion */
-       for (i = 0; i < num_of_ports; i++)
-               init_completion(&slave->port_ready[i]);
-
        /* set the timeout values */
        prop->clk_stop_timeout = 20;