Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5741257pxv; Wed, 7 Jul 2021 10:40:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPgiWOGayCXEmyz9dgq8Bc+kHH0B++9jIGFEMI9YpT9wHw2mXUVbN4MmFsYtbuPX2VKEWQ X-Received: by 2002:a5e:a70a:: with SMTP id b10mr18144102iod.40.1625679627555; Wed, 07 Jul 2021 10:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625679627; cv=none; d=google.com; s=arc-20160816; b=xMe2DHKWvvezccYNorI1hMxZh4KdiEsKsdccUBJSZY6o3qjs3AmExxEzmR4gE8Nzd7 PY1YQwWTDcKOOzUsnGeKCD9B6Ji+NxuogXq2P74UuRgEzo/kdES4sEEVVEvOTN4ilhi9 BZarGo8ECe+aN1arSCjN5F7Lfh8TGMi/ehclzGXfRkbhBeBGHY07Dq5060exLZ+xetL5 wANJ8EL9qrDmO1ZdmrY1qWUNVNLRtBWzpeBSA9Qpdsr2/xKhwGjLQ/K49Kb9dx+kuC+7 F2AmhvKqUqB6etPeE0lLnLGWIjjWVHZ+1HOJf5o0Zz7yLz3k40CPYG4fMftBB/3vtuJB dDig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=BkCX1v9nHd3vdBWUrEANxP2m16SdbxivawkDd4tnOec=; b=zzbxEhqt0JMEc+b2C2XgyDtUnckozaMGEkelEWA64SNXh23mCFTAvr1u2Pm3H2q/53 KeztG5x+iPboRml/l662vp2PcbICvoqvSRgLbRDyuyQyT0uj/WxRmg8LRUxZ5I+qL9SY Ab2m98Ivjd/AIQSQqwgh7bMHC/L33oH2ofPh1Ppod4Mp39orVp+lBcGObvfIIA57JaDW EP7K9Vav7FU6lxCXkp9UX9649s99xT8eVM8MWITEjEuxAX8Vyk3K0IcqRC6sPjqCmOWa HKrk1a9qfYl0IK7tIq9/kx/yjVCADXx+oxxMH9Z9ES71qJGqGW3BYYBsG+dtCJ1tJv3E bTCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id x4si13288211ilj.43.2021.07.07.10.40.11; Wed, 07 Jul 2021 10:40:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230312AbhGGQid (ORCPT + 99 others); Wed, 7 Jul 2021 12:38:33 -0400 Received: from mga17.intel.com ([192.55.52.151]:55274 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbhGGQib (ORCPT ); Wed, 7 Jul 2021 12:38:31 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="189718254" X-IronPort-AV: E=Sophos;i="5.84,220,1620716400"; d="scan'208";a="189718254" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 09:35:38 -0700 X-IronPort-AV: E=Sophos;i="5.84,220,1620716400"; d="scan'208";a="645442799" Received: from cmcarran-mobl.amr.corp.intel.com (HELO [10.213.189.140]) ([10.213.189.140]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 09:35:37 -0700 Subject: Re: [PATCH 10/12] ASoC: amd: add vangogh pci driver pm ops To: Vijendar Mukunda , broonie@kernel.org, alsa-devel@alsa-project.org Cc: Sunil-kumar.Dommati@amd.com, Liam Girdwood , open list , Takashi Iwai , Alexander.Deucher@amd.com References: <20210707055623.27371-1-vijendar.mukunda@amd.com> <20210707055623.27371-11-vijendar.mukunda@amd.com> From: Pierre-Louis Bossart Message-ID: Date: Wed, 7 Jul 2021 11:34:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210707055623.27371-11-vijendar.mukunda@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int snd_acp5x_suspend(struct device *dev) > +{ > + int ret; > + struct acp5x_dev_data *adata; > + > + adata = dev_get_drvdata(dev); > + ret = acp5x_deinit(adata->acp5x_base); > + if (ret) > + dev_err(dev, "ACP de-init failed\n"); > + else > + dev_dbg(dev, "ACP de-initialized\n"); > + > + return ret; > +} > + > +static int snd_acp5x_resume(struct device *dev) > +{ > + int ret; > + struct acp5x_dev_data *adata; > + > + adata = dev_get_drvdata(dev); > + ret = acp5x_init(adata->acp5x_base); > + if (ret) { > + dev_err(dev, "ACP init failed\n"); > + return ret; > + } > + return 0; > +} > + > +static const struct dev_pm_ops acp5x_pm = { > + .runtime_suspend = snd_acp5x_suspend, > + .runtime_resume = snd_acp5x_resume, > + .resume = snd_acp5x_resume, use SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS? also not clear why you don't have a .suspend here? And to avoid warnings use __maybe_unused for those callbacks when PM is disabled?