Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp602923ybc; Tue, 19 Nov 2019 06:27:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzhi6iz9LCwViVDlnbnMJF2EXMKP+tBjHrjj822AXNGzkXa/c+9wwGtHUkUKyWld9yBj7Fi X-Received: by 2002:a1c:6a0d:: with SMTP id f13mr6254582wmc.164.1574173646243; Tue, 19 Nov 2019 06:27:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574173646; cv=none; d=google.com; s=arc-20160816; b=mkysEAPBwSlFV1qF0JuZ8pcZv34CMxuTnZEFXh/LW4N1NGXNPvs6rWG9DV26RKo+mi IEcB1gqIqdoEFwh2A0JVEz7bkNifQjJbpEs+uZpS80Gg6j/h0+oghO9JHNhv0X3zVA0x InjmPI/R92V7kpIa/BmWWq1Jvm5hl25DxPHROv7fXwkdRc8mp/DAXA3IBZvxfZtZr615 2Z1qhDgcCS7oRGNJx32GbD6A1/dPLVa4TZcaQpQFW3N8I8HVxX/dlRFQfeegqf5/RBjC bGL8Q3HanHNdBYxtEDPEcRBsGOdPcQFvvIlwhR/6PicF/6cNMcY1QpflPi1vSLVpNoi2 bZ8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=QDPU3KD4p5WMcxe+ZzNLx3xxo6rmAmS6xgilgOqxSEA=; b=Xqmo4tIl2E3R5eiDT8kTeJPZ75T7PLTm8HwC/E6LV6qOMkGwWyrs9L9y8aEi6oaC3A KbHM0iBUUCbnKFCoTu/hvwd3dANw/i0Oxj6m4mZbGQvzvKEqjVE5Igq1LnXsVkZTiivL 2Q3caneTXizH65LcYrCINQUzRQE5/UxCmdI+HWTRNHVZPeZ4IA9iOY08JgKqNln5/WgI JSHwX3j2+8Z7Ppky/MyWS1mNLkBf8/8RgCyKkR9F4jpDnfzycIctHdFvutL7TmBbo/JU wSO8isXMcyiwW+Wy/z5WW+zPOy2jKamufTKnx8Q7pZ4xyuVzYhN3aSAryOoaQ+nec7+K UmHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be7si13835616edb.438.2019.11.19.06.27.02; Tue, 19 Nov 2019 06:27:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727709AbfKSOZo (ORCPT + 99 others); Tue, 19 Nov 2019 09:25:44 -0500 Received: from mga11.intel.com ([192.55.52.93]:32089 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726369AbfKSOZo (ORCPT ); Tue, 19 Nov 2019 09:25:44 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2019 06:25:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,324,1569308400"; d="scan'208";a="215551232" Received: from trgallx-mobl.amr.corp.intel.com (HELO [10.251.154.79]) ([10.251.154.79]) by fmsmga001.fm.intel.com with ESMTP; 19 Nov 2019 06:25:42 -0800 Subject: Re: [alsa-devel] [PATCH v8 2/6] ASoC: amd: Refactoring of DAI from DMA driver To: Ravulapati Vishnu vardhan rao Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , "Gustavo A. R. Silva" , open list , Takashi Iwai , YueHaibing , Liam Girdwood , Akshu.Agrawal@amd.com, Mark Brown , djkurtz@google.com, Vijendar Mukunda , Alexander.Deucher@amd.com References: <1574155967-1315-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> <1574155967-1315-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> From: Pierre-Louis Bossart Message-ID: <0c3d3545-b0ee-4bb3-558a-045633a30e46@linux.intel.com> Date: Tue, 19 Nov 2019 07:53:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <1574155967-1315-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int acp3x_dai_probe(struct platform_device *pdev) > +{ > + struct resource *res; > + struct i2s_dev_data *adata; > + int status; > + > + adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data), > + GFP_KERNEL); > + if (!adata) > + return -ENOMEM; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + if (!res) { > + dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n"); > + return -ENOMEM; > + } > + > + adata->acp3x_base = devm_ioremap(&pdev->dev, res->start, > + resource_size(res)); > + if (IS_ERR(adata->acp3x_base)) > + return PTR_ERR(adata->acp3x_base); > + > + adata->i2s_irq = res->start; > + dev_set_drvdata(&pdev->dev, adata); > + status = devm_snd_soc_register_component(&pdev->dev, > + &acp3x_dai_component, &acp3x_i2s_dai, 1); > + if (status) { > + dev_err(&pdev->dev, "Fail to register acp i2s dai\n"); > + return -ENODEV; > + } > + pm_runtime_set_autosuspend_delay(&pdev->dev, 5000); > + pm_runtime_use_autosuspend(&pdev->dev); > + pm_runtime_enable(&pdev->dev); question: here you want to use pm_runtime for this platform device... > + return 0; > +} > + > +static int acp3x_dai_remove(struct platform_device *pdev) > +{ > + pm_runtime_disable(&pdev->dev); > + return 0; > +} > +static struct platform_driver acp3x_dai_driver = { > + .probe = acp3x_dai_probe, > + .remove = acp3x_dai_remove, > + .driver = { > + .name = "acp3x_i2s_playcap", ... but here there is no .pm structure and I don't see any suspend/resume routines for this driver... > + }, > +}; > @@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = { > .probe = acp3x_audio_probe, > .remove = acp3x_audio_remove, > .driver = { > - .name = "acp3x_rv_i2s", > + .name = "acp3x_rv_i2s_dma", > .pm = &acp3x_pm_ops, > }, ... but for this other platform_driver you do have a .pm structure and suspend-resume implementations. Wondering if this is a miss or a feature?