* [PATCH v2] soundwire: master: enable pm runtime
@ 2020-07-26 21:59 Bard Liao
2020-08-17 6:34 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Bard Liao @ 2020-07-26 21:59 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
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.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
Changes in v2:
- Edit the commit message to explain why we need the patch.
---
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] 2+ messages in thread
* Re: [PATCH v2] soundwire: master: enable pm runtime
2020-07-26 21:59 [PATCH v2] soundwire: master: enable pm runtime Bard Liao
@ 2020-08-17 6:34 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-08-17 6:34 UTC (permalink / raw)
To: Bard Liao
Cc: pierre-louis.bossart, alsa-devel, tiwai, gregkh, linux-kernel,
ranjani.sridharan, hui.wang, broonie, srinivas.kandagatla, jank,
mengdong.lin, sanyog.r.kale, rander.wang, bard.liao
On 27-07-20, 05:59, Bard Liao wrote:
> 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.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-17 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26 21:59 [PATCH v2] soundwire: master: enable pm runtime Bard Liao
2020-08-17 6:34 ` Vinod Koul
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).