diff options
author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2020-05-19 01:43:22 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-05-19 12:44:35 +0530 |
commit | 26d970225d876437287ec47a60cf4a07fe08733d (patch) | |
tree | 0a231e257d1719087a90fb63937da5b0f3a8a1cf /drivers/soundwire/master.c | |
parent | 7ceaa40b930e462ba0477ca6af34ec04d08181dc (diff) | |
download | linux-26d970225d876437287ec47a60cf4a07fe08733d.tar.bz2 |
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: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20200518174322.31561-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/master.c')
-rw-r--r-- | drivers/soundwire/master.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/soundwire/master.c b/drivers/soundwire/master.c index 6be0a027def7..5411791e6aff 100644 --- a/drivers/soundwire/master.c +++ b/drivers/soundwire/master.c @@ -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, }; /** |