The question is: what happens if that device is NOT described in the Device Tree data? The loop over bus->slaves will not find this device by comparing with known devID values, so the set_bit(i, bus->assigned) will not happen.
yes, that is true, There is no way we can assign a dev_number to the device which is not enumerated on the bus!
Am sure this is the same behavior with soundwire core too, atleast form the code I can see it sets the assigned bit for only the devices that are enumerated on the bus! Not all the devices specified in DT!
Unless I missed something!
I am talking about the other way around, where a device is present and enumerated on the bus but not listed in DT. In that case the hardware did assign a device number but bus->assigned will not be set.