Re: [PATCH] soundwire: bus: iterate DT compatibles for class-ID match
From: Charles Keepax
Date: Mon Sep 07 2026 - 07:20:28 EST
On Mon, Sep 07, 2026 at 10:14:21AM +0100, Srinivas Kandagatla wrote:
> sdw_of_find_slaves() reads only the first "compatible" string on a
> SoundWire slave DT node and rejects the node if that string does not
> parse as sdwVMMMPPPPXX. This prevents the standard DT convention of
> placing a vendor-variant compatible ahead of the SoundWire class-ID
> compatible:
>
> compatible = "vendor,partname", "sdwVMMMPPPPXX";
>
> Iterate every string in the compatible property and accept the first
> one that parses as a SoundWire class ID. The vendor-variant string
> remains visible to driver probe callbacks via device_is_compatible()
> for mode/variant disambiguation.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
> ---
Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
Thanks,
Charles