Re: [PATCH] ASoC: soc-core: Create device_link to ensure correct suspend order
From: Mark Brown
Date: Tue Jun 02 2026 - 11:29:57 EST
On Tue, Jun 02, 2026 at 02:55:09PM +0100, Richard Fitzgerald wrote:
> Oh, you mean two components with the same dev, so that the
> device_link_add() gets called for the same (card,component) devices
> multiple times?
> I tested multiple calls for the same device pair, and it's ok.
> This also covers the case where ASoC core now creates this device_link
> and the codec driver also creates the same device_link between the
> card and itself (hdac_hdmi does this).
> From the kernel doc for device_link_add():
> "if a device link between the given @consumer and @supplier pair
> exists already when this function is called for them, the existing link
> will be returned"
Ah, good - I'd remembered there was an issue with duplicates there. I
guess it's worth adding the defensiveness for card and component being
the same in any case, just to be on the safe side. There were some
SoCs (sunxi I think?) with integrated DACs that I can see doing
something like that, can't remember if they actually do or not.
Attachment:
signature.asc
Description: PGP signature