Re: [PATCH] soundwire: fix initializing sysfs for same devices on different buses

From: Krzysztof Kozlowski
Date: Wed Oct 04 2023 - 09:15:36 EST



On 04/10/2023 15:11, Greg Kroah-Hartman wrote:
>> if (id->unique_id == SDW_IGNORED_UNIQUE_ID) {
>> - /* name shall be sdw:link:mfg:part:class */
>> - dev_set_name(&slave->dev, "sdw:%01x:%04x:%04x:%02x",
>> - bus->link_id, id->mfg_id, id->part_id,
>> + /* name shall be sdw:bus:link:mfg:part:class */
>> + dev_set_name(&slave->dev, "sdw:%01x:%01x:%04x:%04x:%02x",
>> + bus->id, bus->link_id, id->mfg_id, id->part_id,
>> id->class_id);
>> } else {
>> - /* name shall be sdw:link:mfg:part:class:unique */
>> - dev_set_name(&slave->dev, "sdw:%01x:%04x:%04x:%02x:%01x",
>> - bus->link_id, id->mfg_id, id->part_id,
>> + /* name shall be sdw:bus:link:mfg:part:class:unique */
>> + dev_set_name(&slave->dev, "sdw:%01x:%01x:%04x:%04x:%02x:%01x",
>> + bus->id, bus->link_id, id->mfg_id, id->part_id,
>
> Shouldn't some documenation also be changed somewhere that describes the
> device id?


+Cc Srini,

The only reference I found is
Documentation/ABI/testing/sysfs-bus-soundwire-slave [1] and it did not
specify the format of each device name entry.

Vinod, Srini, Pierre-Louis,
Any hints from your side if we have it documented anywhere else?


[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-bus-soundwire-slave?h=v6.6-rc4

Best regards,
Krzysztof