Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Pierre-Louis Bossart and committed by
Vinod Koul
23afc82f f9031288

+7 -3
+1 -1
drivers/soundwire/bus.c
··· 781 781 slave->dev_num = slave->dev_num_sticky; 782 782 783 783 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); 785 785 786 786 return 0; 787 787 }
+3 -1
drivers/soundwire/intel_auxdevice.c
··· 60 60 return sdw->link_res->hw_ops->post_bank_switch(sdw); 61 61 } 62 62 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) 64 66 { 65 67 struct sdw_cdns *cdns = bus_to_cdns(bus); 66 68 struct sdw_intel *sdw = cdns_to_intel(cdns);
+3 -1
include/linux/soundwire/sdw.h
··· 862 862 int (*pre_bank_switch)(struct sdw_bus *bus); 863 863 int (*post_bank_switch)(struct sdw_bus *bus); 864 864 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); 866 868 }; 867 869 868 870 /**