Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3228289rwb; Thu, 29 Sep 2022 23:59:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ILlNXTgqNoPOu4OkE5KlTsjjd24IoN8yVqOm3/D/JjDg0xiuXUOYqcK0CXvsjftAALBR9 X-Received: by 2002:a05:6402:448c:b0:457:52eb:b57e with SMTP id er12-20020a056402448c00b0045752ebb57emr6786276edb.178.1664521148829; Thu, 29 Sep 2022 23:59:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664521148; cv=pass; d=google.com; s=arc-20160816; b=y7yuWDaxlaP3kNwFvhrPR2NUVopcnIepfL4OTn13c56bI+V6gwwyFBhVoZ5nmCHPYZ p3EUT/Z+aRkS4/iIR+x+8vgaI8D/1xhxMvuzATvUmDSZSKL4I57C5reDbRUqrKIPr+5K H0VvzvQrRhGyAMq7oYPxPVfR4ZyvrSo/1nSvuba1wVdetvnU+G8Ftq5B2+LkANllaA4P TNOsPIYPEbpKvv0i6/GaSbROtfZ9Mqyr3MoNx1AAH8kR4acRzxLM8XXOx1e/BOduRGAc NKrD8kYsRFsyqKq9K7CnI4DQ+hNIkZJVLwk3aVX66SvGu19SgISc6v7Qz1yRR9AwUbNT rpOw== 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=XYTwAAt7/koMSdph33oVPkc9b5DPWLIipSpB1mPQMd8=; b=BWh3bQF5CiNJDmVJEQHcWxf8g/5CNlNm8Jipl+oAjG9sFhNTN6s6Iaflf6uELcF6QI yvATBtX9e9OQ4RW9lMfqKfHpYnw40shLcqTjY6t1PCLyxt8ISfIi2dnFedi9qCNZ0tAa qHLrDRfwrp8Qgn8XwEDRTZTcl7w0oU3x0n5wLvDXlwXYQYajUdYR7F0TPEg+bbgzJ56m n3vX5zXZdSbaWoiknvNsLbcHH9J0kbdhIK+cCIVMChK9vHT/mS4wetfXZsZNf8Y6gziu kWG7AKa8yYMnlOogtoOq6RKsj8mmyVmjbvz++UEpw6yxPO8bl8yD+gQ8RNIb8SPt/v2+ C/Hg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=e7PNuN9D; 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 c15-20020a1709060fcf00b007827639fb0bsi1085646ejk.935.2022.09.29.23.58.41; Thu, 29 Sep 2022 23:59:08 -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=e7PNuN9D; 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 S229882AbiI3GrD (ORCPT + 99 others); Fri, 30 Sep 2022 02:47:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231150AbiI3Gqm (ORCPT ); Fri, 30 Sep 2022 02:46:42 -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 33C3A129372; Thu, 29 Sep 2022 23:46:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bb4snV54Z3WxTt1JhQu1b/IMNpYoaul22TJJA5gNAtXoniaouxArH7PqrAmNeJ/LglCZEOjLZvuU2nO3DfrcFi3l9dbadp538tmllKU+cztp34vdmXoE74R3GMnVoDjY8pRHqqsf5iqr4f48larqw2Lv0LoklpXmEovhPliIFD+NqBlfnBPhO+kwNAeW5JPg0aNOFeItgVyV604EH+w60Leq+yKLKCi+mzpu7XZ+S019tzqEtjUZXC1aS4G1hWNwYcs5NorINDvCSMWu51ZxtV42GcEjDAqP9oeE9mQ5hkG9EO1l4m3MNF5JP+PYV+WeiNFcGqjU/Ltd7tMziPgu1w== 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=XYTwAAt7/koMSdph33oVPkc9b5DPWLIipSpB1mPQMd8=; b=kRarVE4l/NKyOjoTTGJrqLwc2sx8b9fOer/3Qyj2zMQUEC0YEakiO4ijfbO9uZ/4j3TbwTy4YuP7lexkJSS6HXFVX8wYwV+dwpSAy43elGhGs6fLe12hygwhVaQ2oDxibr55C69hm56xjiNGCXg5GaMf2oQ/RUHTh11TdFibeFttraoCXSESqgN7km4djFjN2T72LeIxOwfQu8aBGDzzQYnZltFXWQYy/IUhaBHoUmeVRfQZPumCpBI1wZOS7QDqFcYTKedD0KLM2o9LVpENw7NTh9Vm+p9eSbcujCsbtIW+rS+Ta2WTsJc4WMEaEGrDe4Gg+kYfusY1OmDLgi/qYQ== 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=XYTwAAt7/koMSdph33oVPkc9b5DPWLIipSpB1mPQMd8=; b=e7PNuN9DaSPa/0WrKtWoLwXyDDOAeIdVjiMMTF7edy3zbEn1resgIFkGuN9Tlv+tJ8rU2RVipkYg32DyYVX3ZyRFtwbxp9rd+NP/xRVwZ7PW7WDL3u0Z0RLD2ZJ4KLwPCu9kpAyuO6QoY1x/rhzWTouinfBcdGMNMjKC02z8pRQ= 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:13 +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:13 +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 3/7] ASoC: imx-pcm-rpmsg: Register different platform drivers Date: Fri, 30 Sep 2022 14:44:37 +0800 Message-Id: <20220930064441.2548505-4-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: 6fd0eebb-7a9f-4d03-4bb2-08daa2af7784 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hUdEKGzKHstPegjKh8cyr8QDvx2NJKz113KrqeMBAyzmp1+jS1Kc5PX+i4Myst0g8XVvOpq4s65Zz98xJjFqcqUyEHdj2I2z0XNKZqmT6nBVAhuGv78W5WRj6RungNFlrjR3mM6VPNiuyPAsqNYPGtSp/pmUBB6vhzbUcf0acftjwPAEchiagNVXXrWdM32GiFkhNxDe6tYw/1SkwAc/zPEpDY/j2QUxI5VohHqG5AjjJa+Dz9uynGgCETc9O0KRuWtfBEg0Sy5jMcP+h3mfth8E+T3eX6t7BAtFOKnm4NWdlz5GnSnECp29JMCHCAkibGbArilLEixE2WGuuMXZcoEPJ7Dif0WMjLTT+6oKI7RC2/4o+0W+gG/6bGaDdt3ElIeG/IKegsC1NhXion/O94Gi8AEH6IWqS8ZkgPvubODXbinO9dOxc7OPwS7lpQvxc6E4zxG2/f89Mrr7Affb8uCKCiBuU3ngi1fi5Yz/Aks/VfOwkuUNStc/paZR1RObak83nk8lJBCwkk69MCcTqHiPhil2cWwTE87bQkaKgkVaTvNiLiDgkQ5AZ/PyUOrIWEtq+ZUlcHS+6KZpbuG0OHxKU3t9zKgH1G2EIpFZi2eI6pwKPMXuxnKaiTUDvyzJBjy2TLB7hvvdl3iWbpYzAc/iMa50Kl7Lmr1rEUznxoYhpaYlltvy+fAo9j4WtzNNp2k0BGBk4wvnm6tEzssTarewwmDLGYCj2868WxdzBl69m7tfHM99zzpN27zvPk0F16d49dQo1o+HuguZFgXbbugGDdBDsvr/XkL93qWNWJY= 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?mXIGqZGy+rg6sAv6+X/HvnYSHA7H2s5Mhd1gTA8TBC2zb4MdyzFamj0yEGSx?= =?us-ascii?Q?ObB69NLtDa+OK1N5ZddLWP+Z+ePGgVKy5t50K1onGZmVL11Rh4zhRhA3EB3c?= =?us-ascii?Q?qXKwzm4dzsVndswJ2ry+ksa7lISE0rnCybihxhyWIs9I3Gl4U6Ed2TlLoi/x?= =?us-ascii?Q?IgCqVwjfCwhvY8iW5G1+j8evgTYzdJoMjU7t85wC4+xB3wwUojH1n1V1wETo?= =?us-ascii?Q?li4zTxnOva4kp2Xb26+73VaOooiEWodW9Mj2Y8SqMq4HNbBiZuIfSH3q9j6E?= =?us-ascii?Q?cOsWgyq29lBR1EVGNfYTvXZkhhz/lWBwReZq8wUAKfsWLww5P33c9Q1DFS74?= =?us-ascii?Q?BAwDeeFysbUjxTvFlOopX4KpiVmSW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?= =?us-ascii?Q?3DPvaLmADhgfNRYDK81NFFHPC4LlbNWJh7Mh8c9UOVCLgVm21ew4reMqD4qx?= =?us-ascii?Q?jQ1f8lSXm2T/uXyTw/8qC9wgwu016pf++f6PzSfZ6H2Ms7VxFJTjLoixbdIk?= =?us-ascii?Q?8Zlrl5xpJeAH3KnJJg2HGAYMXyTOx0JQ6AT544I7AhNjahuLW1cqfLlCJtc4?= =?us-ascii?Q?k1JlubJpL4IdmDhFY2uKzoFdjDrXjmFwEybFY5gBH4/ktVQfmW3bPRACqmgC?= =?us-ascii?Q?UorVyUVVQS0pA+6rKHL1vMLW6k2W8sBk8dubGczRmUnqkQmjcDFAKAvRPAkG?= =?us-ascii?Q?v3GmcjXb1C7sfG68tP02PKojqk1Zv7AUFqexRomL?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fd0eebb-7a9f-4d03-4bb2-08daa2af7784 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:13.6200 (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: fsg82xx5/zgCX4Opj+Ai5r2UNRXzFqVYig5hRcw8LnFrckNNl0GUrGLFRreFCSHxbWfzhZC8KCCdTtcoJimz2w== 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 This patch can register different ASoC platform drivers if there are several rpmsg channels. Thus sound cards based on different rpmsg channels can link to their respective platform drivers. Besides, the name of driver is equal to the name of rpmsg channel. Signed-off-by: Chancel Liu --- sound/soc/fsl/imx-pcm-rpmsg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c index 35049043e532..3157cd5a837e 100644 --- a/sound/soc/fsl/imx-pcm-rpmsg.c +++ b/sound/soc/fsl/imx-pcm-rpmsg.c @@ -684,7 +684,7 @@ static int imx_rpmsg_pcm_probe(struct platform_device *pdev) info->rpdev = container_of(pdev->dev.parent, struct rpmsg_device, dev); info->dev = &pdev->dev; /* Setup work queue */ - info->rpmsg_wq = alloc_ordered_workqueue("rpmsg_audio", + info->rpmsg_wq = alloc_ordered_workqueue(info->rpdev->id.name, WQ_HIGHPRI | WQ_UNBOUND | WQ_FREEZABLE); @@ -723,11 +723,15 @@ static int imx_rpmsg_pcm_probe(struct platform_device *pdev) if (ret) goto fail; - component = snd_soc_lookup_component(&pdev->dev, IMX_PCM_DRV_NAME); + component = snd_soc_lookup_component(&pdev->dev, NULL); if (!component) { ret = -EINVAL; goto fail; } + + /* platform component name is used by machine driver to link with */ + component->name = info->rpdev->id.name; + #ifdef CONFIG_DEBUG_FS component->debugfs_prefix = "rpmsg"; #endif -- 2.25.1