Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3751742rdb; Thu, 14 Sep 2023 01:08:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1i+J8rXRB0eKA5wSV9G6lIX3XGgAg1Oie1TrRbvSKD4/jguW+NU0v/mq+xRdNL29HrGFS X-Received: by 2002:a05:6a20:96ce:b0:154:b1f7:b396 with SMTP id hq14-20020a056a2096ce00b00154b1f7b396mr4082529pzc.35.1694678933659; Thu, 14 Sep 2023 01:08:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694678933; cv=none; d=google.com; s=arc-20160816; b=VwvwmAiY9sPxrZqyotqRvRChKHB1i/xN+hbRx9ie+eV5aBJv61Ls3lmIblWm32/eHA y0FerV6GfOz8jzPgNUBqKn/t0nIdyOakAC3bcOjxb7HDafMIP8aXPGCaRJhPRAd7KfnL YkvwHsfvZt22QfCnFSxZSSpEXHvhn9Rx5p1N7wwIi9BNmwq9Gicg14pH0FNrfus1xnyz dzrIoAdJRV2P3BvEpjpvxUZevVOlqu5p16+nnmb9Crv67rdWMs7nxNgOvkBWu9uMx6Lx rqnel44r+w++CnQdgj8JhtMYaHlhRdhsYdt8Sxm0kpnfNPCwVCeohXW6nq9pg8dnXMVm ucTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from; bh=4B4Xehj5WX6Su6qhtOvYkMZWaW0M+Zjjml676NOKEgA=; fh=ufiESpW7Hvn5oNmN0l6/qCUiQrKfLLrOwb5uR1Dftds=; b=rxQJhgkC+q9nIYQKmI7ALnhOcuoDjDHGvO1JTP4Le8razyQlB0Jh+NJ5T9lzk/K+3J IJj+uTP/xuwBLukqUtjFD66Ng20z6+1Kzd35UNtATq5sPcZrvooTGG/yPXTIf5GMibeU i/0/aRhmHksiqGJyRxveADwyzWeud2461M908YvRl1LS74cmhNw6Y+dDcR3pBX7+1ybC DAtDSOY/IGth5uLFcOW94cJBqA+pL3ME2v2+tz27NQxuIt4mjNlcf40JswEQ0NWPPOYL 0fzmGrbkYMPh1CU9f6VlEH8fGni3EHeZSVcsrbUNYwyTUgkBaly4+MSI/xXIOQvPsZno cP3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id ot1-20020a17090b3b4100b002741e78e66asi3591761pjb.153.2023.09.14.01.08.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 01:08:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id ACB1980AD088; Wed, 13 Sep 2023 23:31:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235736AbjINGa7 (ORCPT + 99 others); Thu, 14 Sep 2023 02:30:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235585AbjINGaw (ORCPT ); Thu, 14 Sep 2023 02:30:52 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06063CC7 for ; Wed, 13 Sep 2023 23:30:47 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 99C2F1A0640; Thu, 14 Sep 2023 08:30:46 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 622241A0641; Thu, 14 Sep 2023 08:30:46 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 742091834869; Thu, 14 Sep 2023 14:30:44 +0800 (+08) From: Shengjiu Wang To: hverkuil@xs4all.nl, sakari.ailus@iki.fi, tfiga@chromium.org, m.szyprowski@samsung.com, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH v3 5/9] ASoC: fsl_easrc: register m2m platform device Date: Thu, 14 Sep 2023 13:54:01 +0800 Message-Id: <1694670845-17070-6-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1694670845-17070-1-git-send-email-shengjiu.wang@nxp.com> References: <1694670845-17070-1-git-send-email-shengjiu.wang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 13 Sep 2023 23:31:01 -0700 (PDT) Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index f517b407672d..b719d517f9b4 100644 --- a/sound/soc/fsl/fsl_easrc.c +++ b/sound/soc/fsl/fsl_easrc.c @@ -2084,6 +2084,7 @@ MODULE_DEVICE_TABLE(of, fsl_easrc_dt_ids); static int fsl_easrc_probe(struct platform_device *pdev) { struct fsl_easrc_priv *easrc_priv; + struct fsl_asrc_m2m_pdata m2m_pdata; struct device *dev = &pdev->dev; struct fsl_asrc *easrc; struct resource *res; @@ -2202,11 +2203,23 @@ static int fsl_easrc_probe(struct platform_device *pdev) return ret; } + m2m_pdata.asrc = easrc; + easrc->m2m_pdev = platform_device_register_data(&pdev->dev, + M2M_DRV_NAME, + PLATFORM_DEVID_AUTO, + &m2m_pdata, + sizeof(m2m_pdata)); + return 0; } static void fsl_easrc_remove(struct platform_device *pdev) { + struct fsl_asrc *easrc = dev_get_drvdata(&pdev->dev); + + if (easrc->m2m_pdev && !IS_ERR(easrc->m2m_pdev)) + platform_device_unregister(easrc->m2m_pdev); + pm_runtime_disable(&pdev->dev); } -- 2.34.1