alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soundwire: master: enable pm runtime
@ 2020-07-23 13:49 Bard Liao
  2020-07-24  8:32 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Bard Liao @ 2020-07-23 13:49 UTC (permalink / raw)
  To: alsa-devel, vkoul
  Cc: pierre-louis.bossart, vinod.koul, tiwai, gregkh, linux-kernel,
	ranjani.sridharan, hui.wang, broonie, srinivas.kandagatla, jank,
	mengdong.lin, sanyog.r.kale, rander.wang, bard.liao

We should enable pm runtime.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 drivers/soundwire/master.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/soundwire/master.c b/drivers/soundwire/master.c
index 5f0b2189defe..3488bb824e84 100644
--- a/drivers/soundwire/master.c
+++ b/drivers/soundwire/master.c
@@ -154,6 +154,7 @@ int sdw_master_device_add(struct sdw_bus *bus, struct device *parent,
 	bus->dev = &md->dev;
 	bus->md = md;
 
+	pm_runtime_enable(&bus->md->dev);
 device_register_err:
 	return ret;
 }
@@ -166,6 +167,7 @@ int sdw_master_device_add(struct sdw_bus *bus, struct device *parent,
  */
 int sdw_master_device_del(struct sdw_bus *bus)
 {
+	pm_runtime_disable(&bus->md->dev);
 	device_unregister(bus->dev);
 
 	return 0;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] soundwire: master: enable pm runtime
  2020-07-23 13:49 [PATCH] soundwire: master: enable pm runtime Bard Liao
@ 2020-07-24  8:32 ` Greg KH
  2020-07-24 11:09   ` Liao, Bard
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2020-07-24  8:32 UTC (permalink / raw)
  To: Bard Liao
  Cc: pierre-louis.bossart, alsa-devel, vinod.koul, tiwai,
	mengdong.lin, linux-kernel, ranjani.sridharan, hui.wang, vkoul,
	broonie, srinivas.kandagatla, jank, sanyog.r.kale, rander.wang,
	bard.liao

On Thu, Jul 23, 2020 at 09:49:02PM +0800, Bard Liao wrote:
> We should enable pm runtime.

Because why?

Please read the documentation about how to write good changelog
comments...

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] soundwire: master: enable pm runtime
  2020-07-24  8:32 ` Greg KH
@ 2020-07-24 11:09   ` Liao, Bard
  0 siblings, 0 replies; 3+ messages in thread
From: Liao, Bard @ 2020-07-24 11:09 UTC (permalink / raw)
  To: Greg KH, Bard Liao
  Cc: pierre-louis.bossart, alsa-devel, vinod.koul, tiwai, Lin,
	Mengdong, linux-kernel, ranjani.sridharan, hui.wang, vkoul,
	broonie, srinivas.kandagatla, jank, Kale, Sanyog R, rander.wang

> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Friday, July 24, 2020 4:32 PM
> To: Bard Liao <yung-chuan.liao@linux.intel.com>
> Cc: alsa-devel@alsa-project.org; vkoul@kernel.org; vinod.koul@linaro.org;
> linux-kernel@vger.kernel.org; tiwai@suse.de; broonie@kernel.org;
> jank@cadence.com; srinivas.kandagatla@linaro.org;
> rander.wang@linux.intel.com; ranjani.sridharan@linux.intel.com;
> hui.wang@canonical.com; pierre-louis.bossart@linux.intel.com; Kale, Sanyog
> R <sanyog.r.kale@intel.com>; Lin, Mengdong <mengdong.lin@intel.com>;
> Liao, Bard <bard.liao@intel.com>
> Subject: Re: [PATCH] soundwire: master: enable pm runtime
> 
> On Thu, Jul 23, 2020 at 09:49:02PM +0800, Bard Liao wrote:
> > We should enable pm runtime.
> 
> Because why?

The hierarchy of soundwire devices is platform device -> M device -> S
device. A S device is physically attached on the platform device. So the
platform device should be resumed when a S device is resumed. As the
bridge of platform device and S device, we have to implement runtime pm
on M driver. We have set runtime pm ops in M driver already, but still
need to enable runtime pm.

> 
> Please read the documentation about how to write good changelog
> comments...

Sure. I will update the changelog in next version. Thanks for the advice.

> 
> greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-24 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 13:49 [PATCH] soundwire: master: enable pm runtime Bard Liao
2020-07-24  8:32 ` Greg KH
2020-07-24 11:09   ` Liao, Bard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).