[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201127061758.GK8403@vkoul-mobl>
Date: Fri, 27 Nov 2020 11:47:58 +0530
From: Vinod Koul <vkoul@...nel.org>
To: "Liao, Bard" <bard.liao@...el.com>
Cc: "pierre-louis.bossart@...ux.intel.com"
<pierre-louis.bossart@...ux.intel.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"ranjani.sridharan@...ux.intel.com"
<ranjani.sridharan@...ux.intel.com>,
"hui.wang@...onical.com" <hui.wang@...onical.com>,
"srinivas.kandagatla@...aro.org" <srinivas.kandagatla@...aro.org>,
"jank@...ence.com" <jank@...ence.com>,
"Lin, Mengdong" <mengdong.lin@...el.com>,
"Kale, Sanyog R" <sanyog.r.kale@...el.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
"rander.wang@...ux.intel.com" <rander.wang@...ux.intel.com>
Subject: Re: [PATCH] soundwire: master: use pm_runtime_set_active() on add
On 26-11-20, 09:52, Vinod Koul wrote:
> > > > @@ -154,7 +163,12 @@ int sdw_master_device_add(struct sdw_bus *bus,
> > > struct device *parent,
> > > > bus->dev = &md->dev;
> > > > bus->md = md;
> > > >
> > > > + pm_runtime_set_autosuspend_delay(&bus->md->dev,
> > > SDW_MASTER_SUSPEND_DELAY_MS);
> > > > + pm_runtime_use_autosuspend(&bus->md->dev);
> > > > + pm_runtime_mark_last_busy(&bus->md->dev);
> > > > + pm_runtime_set_active(&bus->md->dev);
> > > > pm_runtime_enable(&bus->md->dev);
> > > > + pm_runtime_idle(&bus->md->dev);
> > >
> > > I understand that this needs to be done somewhere but is the core the right
> > > place. In intel case it maybe a dummy device but other controllers are real
> > > devices and may not support pm.
> > >
> > > I think better idea would be to do this in respective driver.. that way it
> > > would be an opt-in for device supporting pm.
> >
> > Should it be put in the same place as pm_runtime_enable?
> > IMHO, pm_runtime_enable is in the core already and it seems to be harmless
> > for devices which don't support pm. And pm can still be optional on md's
> > parent device.
>
> For intel case yes, but world is not only intel, there are md which do
> not have a parent like sof. they are real sdw controller devices
Sorry I confused md with real master device ;-) I guess this patch
should be okay then.. As the real parent will control.
Thanks
--
~Vinod
Powered by blists - more mailing lists