Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3256535rwb; Fri, 30 Sep 2022 00:28:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5GYKKTVyVY0981EFcU77SqGvzRCZpFNsAFDJSuH9JvQF3grMR7+x8xdZKwhymYtyxhlAjy X-Received: by 2002:aa7:d95a:0:b0:458:896b:3cb9 with SMTP id l26-20020aa7d95a000000b00458896b3cb9mr802817eds.253.1664522886824; Fri, 30 Sep 2022 00:28:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664522886; cv=pass; d=google.com; s=arc-20160816; b=viiyKXUztafHRGNcWtBj75OUukudlxfQeiHNF0RfvjCVvEayDOpfDb3m3Pzfg1CBTR oqA69PJnDtj0lhtum7vwfHqznhDw6v3l9tsaQeD0evZrtnrBw9wR0O3PkWmj4bJcBx8J hA7xHN7O3fOQGmmxWjOD6SsECwGVUOA4fYsNO6HZsK7UK31ACWRgwDd19O/NqJPhA4/r Dk3zfi8NO9TKyWmWq8lXyui1JvxFovgA9CQiSGVQdgiNjlh0DpLMw5tNQcMPiZb40def 01gRN29psGnLpyaQQ1VjSxlTyjlRV+jLNMn0AskJ3wzPDG1LCFe51pt1/bwvHpElSF9Q lxuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PxTQ7IVzde13UUXchPar1dvJ+XllS83LF43FxapAL3E=; b=nrD9W7E/T0nsJ6glb8dJj3Lqsegm/G5OITZO8Fq6jDQCKaYSJUJTOPrVlqYlKuMR2X MbHy9TR9E1t6kcESfFFyhRU60QC91XRXiTOzd+kRvL+rziy+/8QAo26i6oZoQ5V+le7a usC/HJ0PdawQUjzbZ/+pGHN52I7lRJFnBF7QIevu+gl4zZKxUYSPPU+crQUnOyGw7X4f /+ooQBmccQUxEo6wb7ON0NRONqb88YeJhiLDyDZFIal3OzA75OXcSXikfLcVOESb/9ru vNx9ivtix+zHg9TloXno+L5jrpbaRNEi+V2xuqWX5T0R6LyZL1/CvBOLgI2k6B4bhM7j F+HQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ovbyTrKA; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 27-20020a17090601db00b00787aba35bb5si1356440ejj.103.2022.09.30.00.27.40; Fri, 30 Sep 2022 00:28:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ovbyTrKA; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230487AbiI3Grk (ORCPT + 99 others); Fri, 30 Sep 2022 02:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbiI3Gqz (ORCPT ); Fri, 30 Sep 2022 02:46:55 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60070.outbound.protection.outlook.com [40.107.6.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A43E5C7455; Thu, 29 Sep 2022 23:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L9a+a3HfuvE2oxy6ROf7QtItpuUxepaSt7hzxu/dVCjfWJaeCdFG2VsdIASt9fS7/2EFIPVPG9Z507L0ktcK3XaUizV6SovQ3mahYfV1Yjrko/I0SFOv/wXgeE0sjqjcmgMHn32zNXJI0bmQ8mBrEqxPNOzUOCg59+suyesSnND4BY1DkC5t11p5DlWMxlmPwoxTtPmG8q6OvH0QfoMOhvc+q/Rw0s6OxRX0UrPL31oVUDt3N3as+OZDMADa0jpV9JWcYPJS80Xzbd5059vL1COppE7584FgOhJV6Ugwi1TDrD+HQkXgPU76+LFJFB/gHt12Fbe4lT22/ipMcHUH2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PxTQ7IVzde13UUXchPar1dvJ+XllS83LF43FxapAL3E=; b=IppSwjybC6FGRayCWpV0GeS2YuaQgu0VdjkrC8n9OTG1m6yVsj5TljHe+pMy6spNVCAYEfhmWsn+wdp5XtEcYQCrPwYiqvOjy4a1F9y2kn2GTsTTXTDE2zGHSogqU4QD/DJZi43PXLQ0GRJTBqidZHj4KYoxs+YRMVMyOL3yKOqhRFj50YGE2o/1KZjcK4WzXvsrWH3wCZpVN+P5gULD4S+PX5c3PpudtLpjbHK5edXsGRypRNvjy6YONwooE41u9VHqzTMK04Mu13/Dw7QpueMy5rHy7nND4cgLW/ouVVC3CHo5CN45t1fpcixapSEHKIa4c341nrInoSI4Yeo4Ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PxTQ7IVzde13UUXchPar1dvJ+XllS83LF43FxapAL3E=; b=ovbyTrKABrEmgxA2XeeXPMZLJRTzQUpYqFj7ayPbY6UgV94nbLFr+w+zUCGJhfGmTXeDAZzPvduxATSdpueMiE125jvr0HLykNCbJ98/gjVLjUCHbBqKwsJjvaOBxeStJf2nmQQil5mUEPit4wTQlMReiBWFmj9TJ8nxq6oRDF0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) by PAXPR04MB8640.eurprd04.prod.outlook.com (2603:10a6:102:21f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Fri, 30 Sep 2022 06:46:32 +0000 Received: from VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::7008:1596:bb4:d904]) by VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::7008:1596:bb4:d904%4]) with mapi id 15.20.5676.023; Fri, 30 Sep 2022 06:46:32 +0000 From: Chancel Liu To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, linuxppc-dev@lists.ozlabs.org Cc: Chancel Liu Subject: [PATCH v3 7/7] ASoC: imx-rpmsg: Assign platform driver used by machine driver to link with Date: Fri, 30 Sep 2022 14:44:41 +0800 Message-Id: <20220930064441.2548505-8-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220930064441.2548505-1-chancel.liu@nxp.com> References: <20220930064441.2548505-1-chancel.liu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0041.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::10) To VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB4222:EE_|PAXPR04MB8640:EE_ X-MS-Office365-Filtering-Correlation-Id: d3f9734a-b949-4071-067e-08daa2af82dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P1RYtWeT0OEu3IGyrZ1PeFVv4tl8Gr/VKdexYZkoSMzBQbaUmZNRwvSDV2hbv5FU0JdSf1CFlTAoXUSbIV2yCuMxWQBMDAgmptIRdqEGj5EZCIfuMatCiijVKyZL0WKhe9JG9A9HSZxAdEAH7pcM/3pu41Xy+Bxn2QbJxrq2bORwn75fUI1+h7F5rS9I+i3r1Wy/vk4QzPaxuRDeFbgeGwdLhJmsMu6GxANCuKNBB3JuA8fcVKoDilMipeQDvOtE5/ih1pcE/BEqxD07nctEXCBk2h1Mj9jVh8VVcfghGuby0v30UGCXCBrYRFlTdLl6OHD1oNvKtCVkOzP9phe1ufYwHDkdOmCivno1LJ4JWAdtKC/21GPto8AolHJw/iesiB453SjHvgbogLlpUnJ0oBZ7CPcylWZ4qt6sGpLtLDubpAYjv1wAwUknnWtVupnlCIi4CENRzkdtVVk7FZS8dTZZO1RwF3OpnUZQu+EoblpqYJRpdHTyQQeAbKBst4CrDLC61gD0lBP5YtXhFEWegds9sw1H/yyIHlSJ4FIKqzIhfEne7wLt3AKpgaaAITWu4NPDkds2m1r8xPbycpoYIO4eruxDao+dDQaky799A09+gY79w0fdC8M7bo2LMQ+eLcM3tzADpiyzUAU6te0LhVYxn/unIFHpg75LW+KSDzoig1PXOSAmICGXMrSKZxk+V7sUfKUgeyi1DKhNEJ6g+1V6UJy1C7ZXZ7w22cGo/gOw//iokpUDFxFNijj8zbm/j8ZkcNX35OcAYy6pblq4ZbD2sk+rtfu2w+LxBffy23c= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB4222.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(451199015)(83380400001)(7416002)(44832011)(5660300002)(66476007)(66556008)(66946007)(316002)(6506007)(41300700001)(4326008)(52116002)(6512007)(26005)(6666004)(36756003)(8936002)(8676002)(86362001)(2906002)(2616005)(186003)(1076003)(38350700002)(38100700002)(921005)(478600001)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?UjSjW1tvTo7XvclbJyYEehLnAVgCYmYe1RsMjJsOdYWfxkkLWo3vXFYjsUEM?= =?us-ascii?Q?a3jk5nh8JZ/6tLn/0/BHwwQ9oxFDEYAAWwEbvQ0+DSRMl71XwpN5HsYmE3Oj?= =?us-ascii?Q?B0dNaiIJaIbzJFDv38w2qt1K31z3yi3RS8+geVf5shKcu2v0+mybiM24I0bN?= =?us-ascii?Q?kkTxjpk5p2i1T90PnUcGECExMGXSnCJAsgBNRowi8RYe74cGQDMhpJ5KM2jI?= =?us-ascii?Q?26rUWNcBqVrOIq50n4+uPNb4sIOpbKIsHPS2pnWBpQMP3Gi3zOddhZKaogCV?= =?us-ascii?Q?ShYE1zbYFV+o1FIjYLIRKyCB9UJ6d2ldsv/677k2x/Xuy8CBOoct7n6Bms6m?= =?us-ascii?Q?6bYbiXJSYLh6ZmwP4qW2i8NMDslKrULhXRF9V78nXCOEVW9TLf5Zj5TDEfGS?= =?us-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LuY0QHXs+pvLSDCnHlSPpDOwZ+bb1x?= =?us-ascii?Q?2NNWvsurtr79q93l4gwAvJPJDsCTtwuyi3ToZItPvCUT/HR9RG+Bu8KPn33f?= =?us-ascii?Q?+gGIpuU5UxQj5pl/2vzDVx5bYVZu1zvBlW5AG3VWZaqOliW5SaBz7Z/W8uEQ?= =?us-ascii?Q?Lxy5g/5B0Hhk8q2Kdp+BfR9Hb/yNTaKlGYFLb4+2xkpzK/iBU7iwabo5A6TA?= =?us-ascii?Q?9LxM/aoR8hiABab/wBkHhFp28jhUOXlf/vLcoxOweOUV2hGXNoFTInoHW7eK?= =?us-ascii?Q?bwuN1wxlFco8+EP+8H7jtHFk55C38vxfdAe1sMV3?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3f9734a-b949-4071-067e-08daa2af82dc X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4222.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2022 06:46:32.8374 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j5smtdEt7MDHvpjNzyGXwuVPrhX3nxh0nROnHDgVXRF2SgU0MeZNONQt9Hq2sIb4SXSQ6o6bL3IhDWdjf0asOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8640 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Each ASoC platform driver is named by rpmsg channel. ASoC machine driver can parse "fsl,rpmsg-channel-name" property to figure out which ASoC platform driver it should link with. Signed-off-by: Chancel Liu --- sound/soc/fsl/imx-rpmsg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index 2e117311e582..57684064c9da 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -36,6 +36,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev) struct platform_device *rpmsg_pdev = to_platform_device(dev); struct device_node *np = rpmsg_pdev->dev.of_node; struct of_phandle_args args; + const char *platform_name; struct imx_rpmsg *data; int ret = 0; @@ -81,7 +82,10 @@ static int imx_rpmsg_probe(struct platform_device *pdev) } data->dai.cpus->dai_name = dev_name(&rpmsg_pdev->dev); - data->dai.platforms->name = IMX_PCM_DRV_NAME; + if (!of_property_read_string(np, "fsl,rpmsg-channel-name", &platform_name)) + data->dai.platforms->name = platform_name; + else + data->dai.platforms->name = "rpmsg-audio-channel"; data->dai.playback_only = true; data->dai.capture_only = true; data->card.num_links = 1; -- 2.25.1