soundwire: bus: add callbacks for device_number allocation
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 31 Jul 2023 09:13:32 +0000 (17:13 +0800)
committerVinod Koul <vkoul@kernel.org>
Fri, 11 Aug 2023 06:59:25 +0000 (07:59 +0100)
commit39d80b0e5fed2c32f66093fead626358b7106974
tree3bc1f056e4bd3054a4d9e47ff92578a770ef9309
parent23afc82fb22bccd3f1d2a856d3eccb70453f33b0
soundwire: bus: add callbacks for device_number allocation

Rather than add logic in the core for vendor-specific usages, add
callbacks for vendor-specific device_number allocation and release.

This patch only moves the existing IDA-based allocator used only by
Intel to the intel_auxdevice.c file and does not change the
functionality. Follow-up patches will extend the behavior by modifying
the Intel callbacks.

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-3-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