[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9f32082a-2f8e-d36c-d409-12bc10e7126f@amd.com>
Date: Fri, 16 Jul 2021 05:19:25 +0530
From: "Mukunda,Vijendar" <vijendar.mukunda@....com>
To: Mark Brown <broonie@...nel.org>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
alsa-devel@...a-project.org, Sunil-kumar.Dommati@....com,
Liam Girdwood <lgirdwood@...il.com>,
open list <linux-kernel@...r.kernel.org>,
Takashi Iwai <tiwai@...e.com>, Alexander.Deucher@....com
Subject: Re: [PATCH 10/12] ASoC: amd: add vangogh pci driver pm ops
On 7/14/21 9:53 PM, Mark Brown wrote:
> 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 = {
>>>>> + .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?
>
>> 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 = {
>> 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.
>
Will make the changes and post the new version.
Powered by blists - more mailing lists