[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04c5911a-a894-44b3-9f0e-fe9e6de203f2@linux.intel.com>
Date: Wed, 4 Oct 2023 11:16:09 -0400
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Vinod Koul <vkoul@...nel.org>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Sanyog Kale <sanyog.r.kale@...el.com>,
Philippe Ombredanne <pombredanne@...b.com>,
Takashi Iwai <tiwai@...e.de>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH] soundwire: fix initializing sysfs for same devices on
different buses
>>>>> If same devices with same device IDs are present on different soundwire
>>>>> buses, the probe fails due to conflicting device names and sysfs
>>>>> entries:
>>>>>
>>>>> sysfs: cannot create duplicate filename '/bus/soundwire/devices/sdw:0:0217:0204:00:0'
>>>>>
>>>>> The link ID is 0 for both devices, so they should be differentiated by
>>>>> bus ID. Add the bus ID so, the device names and sysfs entries look
>>>>> like:
>>>>
>>>> I am pretty sure this will break Intel platforms by changing the device
>>>> names.
>>>>
>>>> sof_sdw.c: else if (is_unique_device(adr_link, sdw_version, mfg_id,
>>>> part_id,
>>>> sof_sdw.c:
>>>> "sdw:%01x:%04x:%04x:%02x", link_id,
>>>> sof_sdw.c:
>>>> "sdw:%01x:%04x:%04x:%02x:%01x", link_id,
>>>
>>> device id name changes shouldn't break things, what is requring them to
>>> look a specific way?
>>
>> it's the ASoC dailink creation that relies on strings, we have similar
>> cases for I2C.
>>
>> There's no requirement that the name follows any specific convention,
>> just that when you want to rely on a specific device for an ASoC card
>> you need to use the string that matches its device name.
>
> matching the name is fine (if you are matching it against an existing
> name) but expecting the name to be anything specific is not going to
> work as the name is dynamic and can/will change each boot.
Not following, sorry.
In the SoundWire context, the device name directly follows the ACPI or
Device Tree information, I don't really see how its name could change on
each boot (assuming no DSDT override or overlays of course). The
platform descriptors are pretty much fixed, aren't they?
Intel and AMD make such assumptions on names for pretty much all machine
drivers, it's not really something new - probably 15+ years? Adding Mark
Brown in CC: to make sure he's aware of this thread.
Powered by blists - more mailing lists