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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B49C0C433F5 for ; Thu, 3 Mar 2022 05:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ikrAMO8YPPry0xv/yk9EwLJOLD/RAgk4+wmeYDQXX9Y=; b=appp+moKqdCVwz JvaYdqxNqDAlePQsvKwB2WQX7OGNyU9uXt5FS8vAd+mXJVIIYkDKmmEtlUV/vIXlDsd71ayZYjop1 f781ZI1IsP3GKeLz15heMfjIXNRi8iBVl1ghhyJ05rtV6Rcejp7xFkgZKl0AiB1AKQcyo0EExJL6W 7Uv34uzejY9pUs3ugADGaIUggwKCiOzD3O8uQWHIC730G/236xjSv7YN0VTm5vNWd66qYJkp7Q16u 4lyUcCgXF8yEjIpaRrSEbArBk/ySqhYfIDzPR9UnrUannihfd/1r8d7EAc0zblRzRJB/x8iAI7xF4 wrlb0DfPVcHJoKLxrhJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPdoz-005ErO-MW; Thu, 03 Mar 2022 05:16:13 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPdov-005EqX-O3; Thu, 03 Mar 2022 05:16:11 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5D5C861766; Thu, 3 Mar 2022 05:16:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91609C004E1; Thu, 3 Mar 2022 05:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646284567; bh=0bq/jJdABYiYg74A+Fe0/noQNqV2iAgsmxYRoawwrlo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uZ5A5oQoJlaOFyFdgdRfHHGQkn4BIGzNHMx23tTiXbv2PzRoXTrI3YduuTBp0Mm77 sYpOvkvXxTGeq8Xoefo30WCa2/LtCfTmCyYCStH5idHLLDLzF65JuJtbOEfeZEHNBx jEvxXX0p65qRHDwTJMhskS5RzBe4xTGqUDrwnGYqkthjApxEajeKwPy7DKwlP1GKTz 60UhG2uZkUnnr+fsd1LvZZLbkzvfyDzY40t85sEXZRUdLIDdfyiESu2lpIKBAwKLjb dcE3UcqlzLEdrtOM6IkYdAhPattuq7VKn19JFr4w0+KP5gRIcHF424ulBCBY1lE4Sd lAzWmgqDd0PVg== Date: Thu, 3 Mar 2022 13:16:03 +0800 From: Tzung-Bi Shih To: Jiaxin Yu Cc: broonie@kernel.org, robh+dt@kernel.org, matthias.bgg@gmail.com, trevor.wu@mediatek.com, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Project_Global_Chrome_Upstream_Group@mediatek.com, Jiaxin Yu Subject: Re: [PATCH 2/2] ASoC: mediatek: mt8192: support rt1015p_rt5682s Message-ID: References: <20220301072924.24814-1-jiaxin.yu@mediatek.com> <20220301072924.24814-3-jiaxin.yu@mediatek.com> <0b8a5c22acb87b49de0380c7cb4e49030f93d715.camel@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0b8a5c22acb87b49de0380c7cb4e49030f93d715.camel@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_211609_871890_4B9C4814 X-CRM114-Status: GOOD ( 15.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 02, 2022 at 12:07:39PM +0800, Jiaxin Yu wrote: > On Tue, 2022-03-01 at 17:03 +0800, Tzung-Bi Shih wrote: > > After seeing the code, I am starting to wonder if the reuse is > > overkill. If > > they (RT5682 vs. RT5682S) only have some minor differences, probably > > it could > > reuse more by: > > > > SND_SOC_DAILINK_DEFS(i2s8, ... > > SND_SOC_DAILINK_DEFS(i2s9, ... > > > > ... > > > > if (card == &mt8192_mt6359_rt1015p_rt5682s_card) { > > i2s8_codecs.name = RT5682S_DEV0_NAME; > > i2s8_codecs.dai_name = RT5682S_CODEC_DAI; > > ... > > } > > > > Or even uses of_device_is_compatible() if it would like to reuse the > > struct > > snd_soc_card. > If we reuse the struct snd_soc_card, the card .name will be same. > Should I change the card .name through of_device_is_compatible()? Exactly yes. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel