[PATCH 2/3] soundwire: qcom: add auto enumeration support
Srinivas Kandagatla
srinivas.kandagatla at linaro.org
Fri Mar 5 17:57:41 CET 2021
On 05/03/2021 16:19, Pierre-Louis Bossart wrote:
>>>
>>>
>>> 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.
thanks for your patience!
Ah, I understand it now!, yes that part is missing!
adding Something like what core does in qcom driver should fix it!
if (!found) {
sdw_slave_add(bus, &id, NULL);
dev_err(bus->dev, "Slave Entry not found\n");
}
--srini
More information about the Alsa-devel
mailing list