Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp534934pxv; Wed, 14 Jul 2021 09:26:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4kfAcO0dIxtrhYs8Ii4PsEPXSyClh15wRHj83go3PyJHlGVZnCclPMoTff6bNSUkCTUDA X-Received: by 2002:a05:6402:5212:: with SMTP id s18mr14859077edd.370.1626279963966; Wed, 14 Jul 2021 09:26:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626279963; cv=none; d=google.com; s=arc-20160816; b=tdB8DeLcTwlrRCp3QwaBNvr+JfGeqZkEtdQEZsdXaA6O5DoLg5GqFfDA0/jF6jE8Hy /w/PnMlHq9UKbpdCMXFy7gn1g8L3IufPWzWCdjR9j5aaWyXdhSWK9Tw3DFUhjrvEes98 IPe2BQRYlwR2WvRRlIKt4j6g95aogipAs1IkuWt4OaC6dtQXFv4esIWMhtbGVT7glKYI mK3r1K5dDrzvZY+ttpBCBa9r+/pknlwjwMRv0WTIwt87/fdfa/0O7UW4vH+KMZMQAaPT uFqDxksXF1io8d6Vf0J/wIlVtdXA2wsROxxXFNrsmkmNOTt/MaeIW4rAHrh5XItAr3F+ mGSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IDfVC95GPwe2FevALGKUhoucMT6wuGRv6tuJxdIhASs=; b=ZShwqdcgslBJhPi2rR6JnEFoHbS8Yw/ffSO7qPrSNZGS2pOjcCWd01nRMHEF9x25jF Z2+sTPIUa4rZ+9/hVDH/nDnQ/5gEpxuRT5nC9RvkdrpYyPyV/kFB4KVBLtR9Szd9c040 PSQBIclJdOvc0uFzJPWCkQr+GnHNoPdoxmLaPWnp0BASO+dJj1LJMUmuXpxq0TDZV/1k DLHm5mym/Kw68RvNK4S5ymruk6ix9fgmA198PpMBsHBdlKxbdZ8nS5ZxfgQ6ryjSR+nm 08MrnbPsi7KqlxDuc/LCTK8zo2uQ2yqlSQeZU0W0rNUNkWpmhBu2f/Y/jr/ljGbdJ/5D glaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UKnUVgN5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m24si3462924edv.366.2021.07.14.09.25.38; Wed, 14 Jul 2021 09:26:03 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UKnUVgN5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232487AbhGNQ1I (ORCPT + 99 others); Wed, 14 Jul 2021 12:27:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:46818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbhGNQ1H (ORCPT ); Wed, 14 Jul 2021 12:27:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A573461106; Wed, 14 Jul 2021 16:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626279856; bh=ydb3bROEvCOilFapPnKxoGtuhQaXeTXNdteDjVKfyIQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UKnUVgN5Vuj1Xmz2RRwq631aSQ4uiLZdgsPhSjSkXWpj/uHQ8Jmy3IvnQmSUEfPwT 11m8uzFLs7Cw/BEjuHqNR8m9LlynlV32YhjUp1eGR+h5c18cIOlv0U3x+7Fe/uv/gb 9SaMsAzCIQboNDfl6sQS4RTAtZsTggaa+wDI7z7JvPQv7SF6iJRpYtigVKmvr9yuYB N5lhzQileVGiG/ISOyLZm1k9ievTEcE3X2AQH4UcBq4OYvuSPX/thWnXcpmtd5XGUy 3W3L+/PeJT2OwQpRBl/G5Nakb/ggDmUSs7gDiSR74LO9mHPrHogj9H5JtZPm1ULIT1 w0KlfpiSsmGQQ== Date: Wed, 14 Jul 2021 17:23:39 +0100 From: Mark Brown To: "Mukunda,Vijendar" Cc: Pierre-Louis Bossart , alsa-devel@alsa-project.org, Sunil-kumar.Dommati@amd.com, Liam Girdwood , open list , Takashi Iwai , Alexander.Deucher@amd.com Subject: Re: [PATCH 10/12] ASoC: amd: add vangogh pci driver pm ops Message-ID: <20210714162339.GD4719@sirena.org.uk> References: <20210707055623.27371-1-vijendar.mukunda@amd.com> <20210707055623.27371-11-vijendar.mukunda@amd.com> <38def9e9-5161-9441-c88a-43b21edfec43@amd.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Xm/fll+QQv+hsKip" Content-Disposition: inline In-Reply-To: <38def9e9-5161-9441-c88a-43b21edfec43@amd.com> X-Cookie: C for yourself. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Xm/fll+QQv+hsKip Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 13, 2021 at 12:06:38PM +0530, Mukunda,Vijendar wrote: > On 7/8/21 5:11 PM, Mukunda,Vijendar wrote: > > On 7/7/21 10:04 PM, Pierre-Louis Bossart wrote: > >>> +static const struct dev_pm_ops acp5x_pm =3D { > >>> + .runtime_suspend =3D snd_acp5x_suspend, > >>> + .runtime_resume =3D snd_acp5x_resume, > >>> + .resume =3D snd_acp5x_resume, > >> use SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS? > suspend and resume callbacks implementation is same for runtime pm ops > and system level pm ops in ACP PCI driver i.e in suspend callback acp > de-init sequence will be invoked and in resume callback acp init > sequence will be invoked. > As per our understanding if we safeguard code with CONFIG_PM_SLEEP > macro, then runtime pm ops won't work. That's not what Pierre is suggesting though? > Do we need to duplicate the same code as mentioned below? > static const struct dev_pm_ops acp5x_pm =3D { > SET_RUNTIME_PM_OPS(snd_acp5x_runtime_suspend, > snd_acp5x_runtime_resume, NULL) > SET_SYSTEM_SLEEP_PM_OPS(snd_acp5x_suspend, snd_acp5x_resume) > }; Using the SET_ macros doesn't require that you duplicate the functions, it literally just means changing the way the ops are assigned. =20 --Xm/fll+QQv+hsKip Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDvD4oACgkQJNaLcl1U h9CFSAf9GXJDYHFf1ZYbjnC5Y/psNti5ZQIkL894y7bQ1oR/KwYUHFEUKag4zOJa UxaEGAEFQe2pcFefvMz8jo6MtARR3jgsoetUVHCQTLdoaEcdsP98XxCQX+cr3yXq 41LkTiKUl1EEiThrDUkDxPlVxzn46R17ilHVQquyAcUgdnZqNb2Ggk2I/HWySA/x ZkSjs8O7cIi0Z90c9qLVoFJRMY4SPvZ9hcf6aEbu/0eo24kWnt21bxD0V03y9u9D fN6UlPF3anejGy3w+B78Ih651m4khWzqqEGYTtXcF6yAll7CYGOSHdMIQVKCd3AI VI5Maa4nX676OciEdgu0YfOmZx3VUw== =9L9r -----END PGP SIGNATURE----- --Xm/fll+QQv+hsKip--