Commit 26d97022 authored by Bard Liao's avatar Bard Liao Committed by Vinod Koul

soundwire: master: add runtime pm support

We need to enable runtime_pm on master device with generic helpers,
so that a Slave-initiated wake is propagated to the bus parent.
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Acked-by: default avatarJaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20200518174322.31561-6-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 7ceaa40b
......@@ -3,6 +3,7 @@
#include <linux/device.h>
#include <linux/acpi.h>
#include <linux/pm_runtime.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_type.h>
#include "bus.h"
......@@ -14,9 +15,15 @@ static void sdw_master_device_release(struct device *dev)
kfree(md);
}
static const struct dev_pm_ops master_dev_pm = {
SET_RUNTIME_PM_OPS(pm_generic_runtime_suspend,
pm_generic_runtime_resume, NULL)
};
struct device_type sdw_master_type = {
.name = "soundwire_master",
.release = sdw_master_device_release,
.pm = &master_dev_pm,
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment