From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 47FF3C2D0CD for ; Thu, 15 May 2025 07:31:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D5CE7618D0; Thu, 15 May 2025 09:27:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D5CE7618D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1747294049; bh=Z0rZwDlBOJabeCJzT7S1mnNOxGO4aa2X5GAQxXZqSbY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QLbH/H/ZhMxytS10SDeuLGYN7m3ADaleTh01ls12W3s3TLlsHrryjJ5X32rUOI8cx ZQpNg6Ow7AL3kPcW17T3IqI9SQNWExYiM9frqywuwD0IC2TdR+ON97qNp0wpfBIhIO PuonE51Z9vtoJe91vYz4NBip1LDAtyQsxwgqEcBs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 22BA2F897A7; Sun, 11 May 2025 16:32:51 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 174DEF897A8; Sun, 11 May 2025 16:32:51 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 116EFF8E6E6; Thu, 1 May 2025 13:37:57 +0200 (CEST) Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B6C54F8E6DE for ; Thu, 1 May 2025 13:37:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6C54F8E6DE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=hOgv58Vt Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 1C54FA48580; Thu, 1 May 2025 11:32:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2FFDC4CEE3; Thu, 1 May 2025 11:37:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746099472; bh=Z0rZwDlBOJabeCJzT7S1mnNOxGO4aa2X5GAQxXZqSbY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hOgv58Vt/VSQjDFB92Q/LRDpc4G1Yavt115Kq0ToiYwJy6WJ6xScbJ1EfxZFgSlZx KtB4W8rCTrJSfLsS1YoIPz1kbSx7vyxDQQBoT5U9NJB6gChwE1tVSeJQKwN8oxJceE JSMW7s9kX9MEdZOHPoENAEpL0HuzQo61OYswK5/HGtfIkMNQZ4jag5IxfIu/HwGh6F VwSNf6A2QYRi2DXpd7vfLvDSpENJqYVq/pICn4/Pf056VheKGkaJgl+EXAeUCe0OjF 1iLIAeyOtuNHNqUAFV5npNmecMDbZomfN+fL5iEojACPmefmQQy2FGoHJgAXYG4zhe D4XsQmopVy3ug== Date: Thu, 1 May 2025 12:37:45 +0100 From: Srinivas Kandagatla To: Luca Weiss Cc: Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai , Bjorn Andersson , Konrad Dybcio , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov , Neil Armstrong Subject: Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data Message-ID: References: <20250425-fp5-dp-sound-v3-0-7cb45180091b@fairphone.com> <20250425-fp5-dp-sound-v3-2-7cb45180091b@fairphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250425-fp5-dp-sound-v3-2-7cb45180091b@fairphone.com> X-MailFrom: srini@kernel.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 4LCVXY3Y5EFNFN6CMWKQVPAPCZCNVCLC X-Message-ID-Hash: 4LCVXY3Y5EFNFN6CMWKQVPAPCZCNVCLC X-Mailman-Approved-At: Sun, 11 May 2025 14:32:47 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, Apr 25, 2025 at 10:07:26AM +0200, Luca Weiss wrote: > Sound machine drivers for Qualcomm SoCs can be reused across multiple > SoCs. But user space ALSA UCM files depend on the card driver name which > should be set per board/SoC. > > Allow such customization by using driver match data as sound card driver > name. > > Also while we're already touching these lines, sort the compatibles > alphabetically. > > Reviewed-by: Dmitry Baryshkov > Reviewed-by: Neil Armstrong > Signed-off-by: Luca Weiss > --- > sound/soc/qcom/sm8250.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c > index b70b2a5031dfbf69024666f8a1049c263efcde0a..e920b413b762c803cfcc4049f35deba828275478 100644 > --- a/sound/soc/qcom/sm8250.c > +++ b/sound/soc/qcom/sm8250.c > @@ -16,7 +16,6 @@ > #include "usb_offload_utils.h" > #include "sdw.h" > > -#define DRIVER_NAME "sm8250" > #define MI2S_BCLK_RATE 1536000 > > struct sm8250_snd_data { > @@ -200,15 +199,15 @@ static int sm8250_platform_probe(struct platform_device *pdev) > if (ret) > return ret; > > - card->driver_name = DRIVER_NAME; > + card->driver_name = of_device_get_match_data(dev); > sm8250_add_be_ops(card); > return devm_snd_soc_register_card(dev, card); > } > > static const struct of_device_id snd_sm8250_dt_match[] = { > - {.compatible = "qcom,sm8250-sndcard"}, > - {.compatible = "qcom,qrb4210-rb2-sndcard"}, > - {.compatible = "qcom,qrb5165-rb5-sndcard"}, > + { .compatible = "qcom,qrb4210-rb2-sndcard", .data = "sm8250" }, sm4250 for rb2? > + { .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" }, > + { .compatible = "qcom,sm8250-sndcard", .data = "sm8250" }, > {} > }; > > > -- > 2.49.0 >