soundwire: extend parameters of new_peripheral_assigned() callback
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 31 Jul 2023 09:13:31 +0000 (17:13 +0800)
committerVinod Koul <vkoul@kernel.org>
Fri, 11 Aug 2023 06:59:25 +0000 (07:59 +0100)
The parameters are only the bus and the device number, manager ops may
need additional details on the type of peripheral connected, such as
whether it is wake-capable or not.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230731091333.3593132-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/bus.c
drivers/soundwire/intel_auxdevice.c
include/linux/soundwire/sdw.h

index dba920e..bdd0fed 100644 (file)
@@ -781,7 +781,7 @@ static int sdw_assign_device_num(struct sdw_slave *slave)
        slave->dev_num = slave->dev_num_sticky;
 
        if (bus->ops && bus->ops->new_peripheral_assigned)
-               bus->ops->new_peripheral_assigned(bus, dev_num);
+               bus->ops->new_peripheral_assigned(bus, slave, dev_num);
 
        return 0;
 }
index 91c86b4..3e7ca4a 100644 (file)
@@ -60,7 +60,9 @@ static int generic_post_bank_switch(struct sdw_bus *bus)
        return sdw->link_res->hw_ops->post_bank_switch(sdw);
 }
 
-static void generic_new_peripheral_assigned(struct sdw_bus *bus, int dev_num)
+static void generic_new_peripheral_assigned(struct sdw_bus *bus,
+                                           struct sdw_slave *slave,
+                                           int dev_num)
 {
        struct sdw_cdns *cdns = bus_to_cdns(bus);
        struct sdw_intel *sdw = cdns_to_intel(cdns);
index f523cea..94676a3 100644 (file)
@@ -862,7 +862,9 @@ struct sdw_master_ops {
        int (*pre_bank_switch)(struct sdw_bus *bus);
        int (*post_bank_switch)(struct sdw_bus *bus);
        u32 (*read_ping_status)(struct sdw_bus *bus);
-       void (*new_peripheral_assigned)(struct sdw_bus *bus, int dev_num);
+       void (*new_peripheral_assigned)(struct sdw_bus *bus,
+                                       struct sdw_slave *slave,
+                                       int dev_num);
 };
 
 /**