Skip to content

Commit 23afc82

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: extend parameters of new_peripheral_assigned() callback
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>
1 parent f903128 commit 23afc82

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

drivers/soundwire/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ static int sdw_assign_device_num(struct sdw_slave *slave)
781781
slave->dev_num = slave->dev_num_sticky;
782782

783783
if (bus->ops && bus->ops->new_peripheral_assigned)
784-
bus->ops->new_peripheral_assigned(bus, dev_num);
784+
bus->ops->new_peripheral_assigned(bus, slave, dev_num);
785785

786786
return 0;
787787
}

drivers/soundwire/intel_auxdevice.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ static int generic_post_bank_switch(struct sdw_bus *bus)
6060
return sdw->link_res->hw_ops->post_bank_switch(sdw);
6161
}
6262

63-
static void generic_new_peripheral_assigned(struct sdw_bus *bus, int dev_num)
63+
static void generic_new_peripheral_assigned(struct sdw_bus *bus,
64+
struct sdw_slave *slave,
65+
int dev_num)
6466
{
6567
struct sdw_cdns *cdns = bus_to_cdns(bus);
6668
struct sdw_intel *sdw = cdns_to_intel(cdns);

include/linux/soundwire/sdw.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,9 @@ struct sdw_master_ops {
862862
int (*pre_bank_switch)(struct sdw_bus *bus);
863863
int (*post_bank_switch)(struct sdw_bus *bus);
864864
u32 (*read_ping_status)(struct sdw_bus *bus);
865-
void (*new_peripheral_assigned)(struct sdw_bus *bus, int dev_num);
865+
void (*new_peripheral_assigned)(struct sdw_bus *bus,
866+
struct sdw_slave *slave,
867+
int dev_num);
866868
};
867869

868870
/**

0 commit comments

Comments
 (0)