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

Merge tag 'soundwire-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire updates from Vinod Koul:
"Device numbering and intel driver changes are main features:

- Core support for soundwire device number allocation

- intel driver updates for adding hw_params for DAI ops, hybrid
number allocation and power managemnt callback updates

- DT header include changes for subsystem"

* tag 'soundwire-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
soundwire: intel_ace2x: add DAI hw_params/prepare/hw_free callbacks
soundwire: intel_auxdevice: add hybrid IDA-based device_number allocation
soundwire: bus: add callbacks for device_number allocation
soundwire: extend parameters of new_peripheral_assigned() callback
soundWire: intel_auxdevice: resume 'sdw-master' on startup and system resume
soundwire: intel_auxdevice: enable pm_runtime earlier on startup
soundwire: Explicitly include correct DT includes

+401 -32
+8 -10
drivers/soundwire/bus.c
··· 13 13 #include "sysfs_local.h" 14 14 15 15 static DEFINE_IDA(sdw_bus_ida); 16 - static DEFINE_IDA(sdw_peripheral_ida); 17 16 18 17 static int sdw_get_id(struct sdw_bus *bus) 19 18 { ··· 193 194 194 195 if (slave->dev_num) { /* clear dev_num if assigned */ 195 196 clear_bit(slave->dev_num, bus->assigned); 196 - if (bus->dev_num_ida_min) 197 - ida_free(&sdw_peripheral_ida, slave->dev_num); 197 + if (bus->ops && bus->ops->put_device_num) 198 + bus->ops->put_device_num(bus, slave); 198 199 } 199 200 list_del_init(&slave->node); 200 201 mutex_unlock(&bus->bus_lock); ··· 738 739 /* called with bus_lock held */ 739 740 static int sdw_get_device_num(struct sdw_slave *slave) 740 741 { 742 + struct sdw_bus *bus = slave->bus; 741 743 int bit; 742 744 743 - if (slave->bus->dev_num_ida_min) { 744 - bit = ida_alloc_range(&sdw_peripheral_ida, 745 - slave->bus->dev_num_ida_min, SDW_MAX_DEVICES, 746 - GFP_KERNEL); 745 + if (bus->ops && bus->ops->get_device_num) { 746 + bit = bus->ops->get_device_num(bus, slave); 747 747 if (bit < 0) 748 748 goto err; 749 749 } else { 750 - bit = find_first_zero_bit(slave->bus->assigned, SDW_MAX_DEVICES); 750 + bit = find_first_zero_bit(bus->assigned, SDW_MAX_DEVICES); 751 751 if (bit == SDW_MAX_DEVICES) { 752 752 bit = -ENODEV; 753 753 goto err; ··· 757 759 * Do not update dev_num in Slave data structure here, 758 760 * Update once program dev_num is successful 759 761 */ 760 - set_bit(bit, slave->bus->assigned); 762 + set_bit(bit, bus->assigned); 761 763 762 764 err: 763 765 return bit; ··· 808 810 slave->dev_num = slave->dev_num_sticky; 809 811 810 812 if (bus->ops && bus->ops->new_peripheral_assigned) 811 - bus->ops->new_peripheral_assigned(bus, dev_num); 813 + bus->ops->new_peripheral_assigned(bus, slave, dev_num); 812 814 813 815 return 0; 814 816 }
+283
drivers/soundwire/intel_ace2x.c
··· 10 10 #include <linux/soundwire/sdw_registers.h> 11 11 #include <linux/soundwire/sdw.h> 12 12 #include <linux/soundwire/sdw_intel.h> 13 + #include <sound/pcm_params.h> 13 14 #include <sound/hda-mlink.h> 14 15 #include "cadence_master.h" 15 16 #include "bus.h" ··· 192 191 return hdac_bus_eml_sdw_check_cmdsync_unlocked(sdw->link_res->hbus); 193 192 } 194 193 194 + /* DAI callbacks */ 195 + static int intel_params_stream(struct sdw_intel *sdw, 196 + struct snd_pcm_substream *substream, 197 + struct snd_soc_dai *dai, 198 + struct snd_pcm_hw_params *hw_params, 199 + int link_id, int alh_stream_id) 200 + { 201 + struct sdw_intel_link_res *res = sdw->link_res; 202 + struct sdw_intel_stream_params_data params_data; 203 + 204 + params_data.substream = substream; 205 + params_data.dai = dai; 206 + params_data.hw_params = hw_params; 207 + params_data.link_id = link_id; 208 + params_data.alh_stream_id = alh_stream_id; 209 + 210 + if (res->ops && res->ops->params_stream && res->dev) 211 + return res->ops->params_stream(res->dev, 212 + &params_data); 213 + return -EIO; 214 + } 215 + 216 + static int intel_free_stream(struct sdw_intel *sdw, 217 + struct snd_pcm_substream *substream, 218 + struct snd_soc_dai *dai, 219 + int link_id) 220 + 221 + { 222 + struct sdw_intel_link_res *res = sdw->link_res; 223 + struct sdw_intel_stream_free_data free_data; 224 + 225 + free_data.substream = substream; 226 + free_data.dai = dai; 227 + free_data.link_id = link_id; 228 + 229 + if (res->ops && res->ops->free_stream && res->dev) 230 + return res->ops->free_stream(res->dev, 231 + &free_data); 232 + 233 + return 0; 234 + } 235 + 195 236 /* 196 237 * DAI operations 197 238 */ 239 + static int intel_hw_params(struct snd_pcm_substream *substream, 240 + struct snd_pcm_hw_params *params, 241 + struct snd_soc_dai *dai) 242 + { 243 + struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai); 244 + struct sdw_intel *sdw = cdns_to_intel(cdns); 245 + struct sdw_cdns_dai_runtime *dai_runtime; 246 + struct sdw_cdns_pdi *pdi; 247 + struct sdw_stream_config sconfig; 248 + struct sdw_port_config *pconfig; 249 + int ch, dir; 250 + int ret; 251 + 252 + dai_runtime = cdns->dai_runtime_array[dai->id]; 253 + if (!dai_runtime) 254 + return -EIO; 255 + 256 + ch = params_channels(params); 257 + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) 258 + dir = SDW_DATA_DIR_RX; 259 + else 260 + dir = SDW_DATA_DIR_TX; 261 + 262 + pdi = sdw_cdns_alloc_pdi(cdns, &cdns->pcm, ch, dir, dai->id); 263 + 264 + if (!pdi) { 265 + ret = -EINVAL; 266 + goto error; 267 + } 268 + 269 + /* the SHIM will be configured in the callback functions */ 270 + 271 + sdw_cdns_config_stream(cdns, ch, dir, pdi); 272 + 273 + /* store pdi and state, may be needed in prepare step */ 274 + dai_runtime->paused = false; 275 + dai_runtime->suspended = false; 276 + dai_runtime->pdi = pdi; 277 + 278 + /* Inform DSP about PDI stream number */ 279 + ret = intel_params_stream(sdw, substream, dai, params, 280 + sdw->instance, 281 + pdi->intel_alh_id); 282 + if (ret) 283 + goto error; 284 + 285 + sconfig.direction = dir; 286 + sconfig.ch_count = ch; 287 + sconfig.frame_rate = params_rate(params); 288 + sconfig.type = dai_runtime->stream_type; 289 + 290 + sconfig.bps = snd_pcm_format_width(params_format(params)); 291 + 292 + /* Port configuration */ 293 + pconfig = kzalloc(sizeof(*pconfig), GFP_KERNEL); 294 + if (!pconfig) { 295 + ret = -ENOMEM; 296 + goto error; 297 + } 298 + 299 + pconfig->num = pdi->num; 300 + pconfig->ch_mask = (1 << ch) - 1; 301 + 302 + ret = sdw_stream_add_master(&cdns->bus, &sconfig, 303 + pconfig, 1, dai_runtime->stream); 304 + if (ret) 305 + dev_err(cdns->dev, "add master to stream failed:%d\n", ret); 306 + 307 + kfree(pconfig); 308 + error: 309 + return ret; 310 + } 311 + 312 + static int intel_prepare(struct snd_pcm_substream *substream, 313 + struct snd_soc_dai *dai) 314 + { 315 + struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai); 316 + struct sdw_intel *sdw = cdns_to_intel(cdns); 317 + struct sdw_cdns_dai_runtime *dai_runtime; 318 + int ch, dir; 319 + int ret = 0; 320 + 321 + dai_runtime = cdns->dai_runtime_array[dai->id]; 322 + if (!dai_runtime) { 323 + dev_err(dai->dev, "failed to get dai runtime in %s\n", 324 + __func__); 325 + return -EIO; 326 + } 327 + 328 + if (dai_runtime->suspended) { 329 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 330 + struct snd_pcm_hw_params *hw_params; 331 + 332 + hw_params = &rtd->dpcm[substream->stream].hw_params; 333 + 334 + dai_runtime->suspended = false; 335 + 336 + /* 337 + * .prepare() is called after system resume, where we 338 + * need to reinitialize the SHIM/ALH/Cadence IP. 339 + * .prepare() is also called to deal with underflows, 340 + * but in those cases we cannot touch ALH/SHIM 341 + * registers 342 + */ 343 + 344 + /* configure stream */ 345 + ch = params_channels(hw_params); 346 + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) 347 + dir = SDW_DATA_DIR_RX; 348 + else 349 + dir = SDW_DATA_DIR_TX; 350 + 351 + /* the SHIM will be configured in the callback functions */ 352 + 353 + sdw_cdns_config_stream(cdns, ch, dir, dai_runtime->pdi); 354 + 355 + /* Inform DSP about PDI stream number */ 356 + ret = intel_params_stream(sdw, substream, dai, 357 + hw_params, 358 + sdw->instance, 359 + dai_runtime->pdi->intel_alh_id); 360 + } 361 + 362 + return ret; 363 + } 364 + 365 + static int 366 + intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) 367 + { 368 + struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai); 369 + struct sdw_intel *sdw = cdns_to_intel(cdns); 370 + struct sdw_cdns_dai_runtime *dai_runtime; 371 + int ret; 372 + 373 + dai_runtime = cdns->dai_runtime_array[dai->id]; 374 + if (!dai_runtime) 375 + return -EIO; 376 + 377 + /* 378 + * The sdw stream state will transition to RELEASED when stream-> 379 + * master_list is empty. So the stream state will transition to 380 + * DEPREPARED for the first cpu-dai and to RELEASED for the last 381 + * cpu-dai. 382 + */ 383 + ret = sdw_stream_remove_master(&cdns->bus, dai_runtime->stream); 384 + if (ret < 0) { 385 + dev_err(dai->dev, "remove master from stream %s failed: %d\n", 386 + dai_runtime->stream->name, ret); 387 + return ret; 388 + } 389 + 390 + ret = intel_free_stream(sdw, substream, dai, sdw->instance); 391 + if (ret < 0) { 392 + dev_err(dai->dev, "intel_free_stream: failed %d\n", ret); 393 + return ret; 394 + } 395 + 396 + dai_runtime->pdi = NULL; 397 + 398 + return 0; 399 + } 400 + 401 + static int intel_pcm_set_sdw_stream(struct snd_soc_dai *dai, 402 + void *stream, int direction) 403 + { 404 + return cdns_set_sdw_stream(dai, stream, direction); 405 + } 406 + 407 + static void *intel_get_sdw_stream(struct snd_soc_dai *dai, 408 + int direction) 409 + { 410 + struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai); 411 + struct sdw_cdns_dai_runtime *dai_runtime; 412 + 413 + dai_runtime = cdns->dai_runtime_array[dai->id]; 414 + if (!dai_runtime) 415 + return ERR_PTR(-EINVAL); 416 + 417 + return dai_runtime->stream; 418 + } 419 + 420 + static int intel_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) 421 + { 422 + struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai); 423 + struct sdw_intel *sdw = cdns_to_intel(cdns); 424 + struct sdw_intel_link_res *res = sdw->link_res; 425 + struct sdw_cdns_dai_runtime *dai_runtime; 426 + int ret = 0; 427 + 428 + /* 429 + * The .trigger callback is used to program HDaudio DMA and send required IPC to audio 430 + * firmware. 431 + */ 432 + if (res->ops && res->ops->trigger) { 433 + ret = res->ops->trigger(substream, cmd, dai); 434 + if (ret < 0) 435 + return ret; 436 + } 437 + 438 + dai_runtime = cdns->dai_runtime_array[dai->id]; 439 + if (!dai_runtime) { 440 + dev_err(dai->dev, "failed to get dai runtime in %s\n", 441 + __func__); 442 + return -EIO; 443 + } 444 + 445 + switch (cmd) { 446 + case SNDRV_PCM_TRIGGER_SUSPEND: 447 + 448 + /* 449 + * The .prepare callback is used to deal with xruns and resume operations. 450 + * In the case of xruns, the DMAs and SHIM registers cannot be touched, 451 + * but for resume operations the DMAs and SHIM registers need to be initialized. 452 + * the .trigger callback is used to track the suspend case only. 453 + */ 454 + 455 + dai_runtime->suspended = true; 456 + 457 + break; 458 + 459 + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 460 + dai_runtime->paused = true; 461 + break; 462 + case SNDRV_PCM_TRIGGER_STOP: 463 + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 464 + dai_runtime->paused = false; 465 + break; 466 + default: 467 + break; 468 + } 469 + 470 + return ret; 471 + } 472 + 198 473 static const struct snd_soc_dai_ops intel_pcm_dai_ops = { 474 + .hw_params = intel_hw_params, 475 + .prepare = intel_prepare, 476 + .hw_free = intel_hw_free, 477 + .trigger = intel_trigger, 478 + .set_stream = intel_pcm_set_sdw_stream, 479 + .get_stream = intel_get_sdw_stream, 199 480 }; 200 481 201 482 static const struct snd_soc_component_driver dai_component = {
+96 -16
drivers/soundwire/intel_auxdevice.c
··· 23 23 #include "intel.h" 24 24 #include "intel_auxdevice.h" 25 25 26 - /* IDA min selected to avoid conflicts with HDaudio/iDISP SDI values */ 27 - #define INTEL_DEV_NUM_IDA_MIN 4 28 - 29 26 #define INTEL_MASTER_SUSPEND_DELAY_MS 3000 30 27 31 28 /* ··· 41 44 module_param_named(sdw_md_flags, md_flags, int, 0444); 42 45 MODULE_PARM_DESC(sdw_md_flags, "SoundWire Intel Master device flags (0x0 all off)"); 43 46 47 + struct wake_capable_part { 48 + const u16 mfg_id; 49 + const u16 part_id; 50 + }; 51 + 52 + static struct wake_capable_part wake_capable_list[] = { 53 + {0x025d, 0x5682}, 54 + {0x025d, 0x700}, 55 + {0x025d, 0x711}, 56 + {0x025d, 0x1712}, 57 + {0x025d, 0x1713}, 58 + {0x025d, 0x1716}, 59 + {0x025d, 0x1717}, 60 + {0x025d, 0x712}, 61 + {0x025d, 0x713}, 62 + {0x025d, 0x714}, 63 + {0x025d, 0x715}, 64 + {0x025d, 0x716}, 65 + {0x025d, 0x717}, 66 + {0x025d, 0x722}, 67 + }; 68 + 69 + static bool is_wake_capable(struct sdw_slave *slave) 70 + { 71 + int i; 72 + 73 + for (i = 0; i < ARRAY_SIZE(wake_capable_list); i++) 74 + if (slave->id.part_id == wake_capable_list[i].part_id && 75 + slave->id.mfg_id == wake_capable_list[i].mfg_id) 76 + return true; 77 + return false; 78 + } 79 + 44 80 static int generic_pre_bank_switch(struct sdw_bus *bus) 45 81 { 46 82 struct sdw_cdns *cdns = bus_to_cdns(bus); ··· 90 60 return sdw->link_res->hw_ops->post_bank_switch(sdw); 91 61 } 92 62 93 - 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) 94 66 { 95 67 struct sdw_cdns *cdns = bus_to_cdns(bus); 96 68 struct sdw_intel *sdw = cdns_to_intel(cdns); 69 + int dev_num_min; 70 + int dev_num_max; 71 + bool wake_capable = slave->prop.wake_capable || is_wake_capable(slave); 72 + 73 + if (wake_capable) { 74 + dev_num_min = SDW_INTEL_DEV_NUM_IDA_MIN; 75 + dev_num_max = SDW_MAX_DEVICES; 76 + } else { 77 + dev_num_min = 1; 78 + dev_num_max = SDW_INTEL_DEV_NUM_IDA_MIN - 1; 79 + } 97 80 98 81 /* paranoia check, this should never happen */ 99 - if (dev_num < INTEL_DEV_NUM_IDA_MIN || dev_num > SDW_MAX_DEVICES) { 100 - dev_err(bus->dev, "%s: invalid dev_num %d\n", __func__, dev_num); 82 + if (dev_num < dev_num_min || dev_num > dev_num_max) { 83 + dev_err(bus->dev, "%s: invalid dev_num %d, wake supported %d\n", 84 + __func__, dev_num, slave->prop.wake_capable); 101 85 return; 102 86 } 103 87 104 - if (sdw->link_res->hw_ops->program_sdi) 88 + if (sdw->link_res->hw_ops->program_sdi && wake_capable) 105 89 sdw->link_res->hw_ops->program_sdi(sdw, dev_num); 106 90 } 107 91 ··· 167 123 return 0; 168 124 } 169 125 126 + static DEFINE_IDA(intel_peripheral_ida); 127 + 128 + static int intel_get_device_num_ida(struct sdw_bus *bus, struct sdw_slave *slave) 129 + { 130 + int bit; 131 + 132 + if (slave->prop.wake_capable || is_wake_capable(slave)) 133 + return ida_alloc_range(&intel_peripheral_ida, 134 + SDW_INTEL_DEV_NUM_IDA_MIN, SDW_MAX_DEVICES, 135 + GFP_KERNEL); 136 + 137 + bit = find_first_zero_bit(slave->bus->assigned, SDW_MAX_DEVICES); 138 + if (bit == SDW_MAX_DEVICES) 139 + return -ENODEV; 140 + 141 + return bit; 142 + } 143 + 144 + static void intel_put_device_num_ida(struct sdw_bus *bus, struct sdw_slave *slave) 145 + { 146 + if (slave->prop.wake_capable || is_wake_capable(slave)) 147 + ida_free(&intel_peripheral_ida, slave->dev_num); 148 + } 149 + 170 150 static struct sdw_master_ops sdw_intel_ops = { 171 151 .read_prop = intel_prop_read, 172 152 .override_adr = sdw_dmi_override_adr, ··· 200 132 .pre_bank_switch = generic_pre_bank_switch, 201 133 .post_bank_switch = generic_post_bank_switch, 202 134 .read_ping_status = cdns_read_ping_status, 135 + .get_device_num = intel_get_device_num_ida, 136 + .put_device_num = intel_put_device_num_ida, 203 137 .new_peripheral_assigned = generic_new_peripheral_assigned, 204 138 }; 205 139 ··· 235 165 cdns->msg_count = 0; 236 166 237 167 bus->link_id = auxdev->id; 238 - bus->dev_num_ida_min = INTEL_DEV_NUM_IDA_MIN; 239 168 bus->clk_stop_timeout = 1; 240 169 241 170 sdw_cdns_probe(cdns); ··· 317 248 318 249 sdw_intel_debugfs_init(sdw); 319 250 320 - /* start bus */ 321 - ret = sdw_intel_start_bus(sdw); 322 - if (ret) { 323 - dev_err(dev, "bus start failed: %d\n", ret); 324 - goto err_power_up; 325 - } 326 - 327 251 /* Enable runtime PM */ 328 252 if (!(link_flags & SDW_INTEL_MASTER_DISABLE_PM_RUNTIME)) { 329 253 pm_runtime_set_autosuspend_delay(dev, ··· 326 264 327 265 pm_runtime_set_active(dev); 328 266 pm_runtime_enable(dev); 267 + 268 + pm_runtime_resume(bus->dev); 269 + } 270 + 271 + /* start bus */ 272 + ret = sdw_intel_start_bus(sdw); 273 + if (ret) { 274 + dev_err(dev, "bus start failed: %d\n", ret); 275 + goto err_pm_runtime; 329 276 } 330 277 331 278 clock_stop_quirks = sdw->link_res->clock_stop_quirks; ··· 364 293 * with a delay. A more complete solution would require the 365 294 * definition of Master properties. 366 295 */ 367 - if (!(link_flags & SDW_INTEL_MASTER_DISABLE_PM_RUNTIME_IDLE)) 296 + if (!(link_flags & SDW_INTEL_MASTER_DISABLE_PM_RUNTIME_IDLE)) { 297 + pm_runtime_mark_last_busy(bus->dev); 298 + pm_runtime_mark_last_busy(dev); 368 299 pm_runtime_idle(dev); 300 + } 369 301 370 302 sdw->startup_done = true; 371 303 return 0; 372 304 305 + err_pm_runtime: 306 + if (!(link_flags & SDW_INTEL_MASTER_DISABLE_PM_RUNTIME)) 307 + pm_runtime_disable(dev); 373 308 err_power_up: 374 309 sdw_intel_link_power_down(sdw); 375 310 err_init: ··· 629 552 pm_runtime_mark_last_busy(dev); 630 553 pm_runtime_enable(dev); 631 554 555 + pm_runtime_resume(bus->dev); 556 + 632 557 link_flags = md_flags >> (bus->link_id * 8); 633 558 634 559 if (!(link_flags & SDW_INTEL_MASTER_DISABLE_PM_RUNTIME_IDLE)) ··· 666 587 * counters and delay the pm_runtime suspend by several 667 588 * seconds, by when all enumeration should be complete. 668 589 */ 590 + pm_runtime_mark_last_busy(bus->dev); 669 591 pm_runtime_mark_last_busy(dev); 670 592 671 593 return 0;
-1
drivers/soundwire/qcom.c
··· 10 10 #include <linux/debugfs.h> 11 11 #include <linux/of.h> 12 12 #include <linux/of_irq.h> 13 - #include <linux/of_device.h> 14 13 #include <linux/pm_runtime.h> 15 14 #include <linux/regmap.h> 16 15 #include <linux/reset.h>
+7 -5
include/linux/soundwire/sdw.h
··· 858 858 * @post_bank_switch: Callback for post bank switch 859 859 * @read_ping_status: Read status from PING frames, reported with two bits per Device. 860 860 * Bits 31:24 are reserved. 861 + * @get_device_num: Callback for vendor-specific device_number allocation 862 + * @put_device_num: Callback for vendor-specific device_number release 861 863 * @new_peripheral_assigned: Callback to handle enumeration of new peripheral. 862 864 */ 863 865 struct sdw_master_ops { ··· 875 873 int (*pre_bank_switch)(struct sdw_bus *bus); 876 874 int (*post_bank_switch)(struct sdw_bus *bus); 877 875 u32 (*read_ping_status)(struct sdw_bus *bus); 878 - void (*new_peripheral_assigned)(struct sdw_bus *bus, int dev_num); 876 + int (*get_device_num)(struct sdw_bus *bus, struct sdw_slave *slave); 877 + void (*put_device_num)(struct sdw_bus *bus, struct sdw_slave *slave); 878 + void (*new_peripheral_assigned)(struct sdw_bus *bus, 879 + struct sdw_slave *slave, 880 + int dev_num); 879 881 }; 880 882 881 883 /** ··· 914 908 * meaningful if multi_link is set. If set to 1, hardware-based 915 909 * synchronization will be used even if a stream only uses a single 916 910 * SoundWire segment. 917 - * @dev_num_ida_min: if set, defines the minimum values for the IDA 918 - * used to allocate system-unique device numbers. This value needs to be 919 - * identical across all SoundWire bus in the system. 920 911 */ 921 912 struct sdw_bus { 922 913 struct device *dev; ··· 942 939 u32 bank_switch_timeout; 943 940 bool multi_link; 944 941 int hw_sync_min_links; 945 - int dev_num_ida_min; 946 942 }; 947 943 948 944 int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
+7
include/linux/soundwire/sdw_intel.h
··· 428 428 extern const struct sdw_intel_hw_ops sdw_intel_cnl_hw_ops; 429 429 extern const struct sdw_intel_hw_ops sdw_intel_lnl_hw_ops; 430 430 431 + /* 432 + * IDA min selected to allow for 5 unconstrained devices per link, 433 + * and 6 system-unique Device Numbers for wake-capable devices. 434 + */ 435 + 436 + #define SDW_INTEL_DEV_NUM_IDA_MIN 6 437 + 431 438 #endif