diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2023-01-17 11:51:33 +0000 |
---|---|---|
committer | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2023-02-10 14:18:13 +0000 |
commit | 33d37ade00f9b73323fa5d4a0e0eb6a3115bbf39 (patch) | |
tree | e7d6bbd02ae830e29709d7bea9e574191343b674 | |
parent | d1b6c64699659c39c07514a001f7a03824531793 (diff) |
soundwire: qcom: enable runtime pm before controller is registered
Registering controller even before pm runtime is enabled will result
in pm runtime underflow warnings. Fix this by properly moving
the runtime pm enable before registering controller.
Fixes: 74e79da9fd46 ("soundwire: qcom: add runtime pm support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r-- | drivers/soundwire/qcom.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 9d8ae77bad0af..b2363839624cd 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -1417,6 +1417,12 @@ static int qcom_swrm_probe(struct platform_device *pdev) } } + pm_runtime_set_autosuspend_delay(dev, 3000); + pm_runtime_use_autosuspend(dev); + pm_runtime_mark_last_busy(dev); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); + ret = sdw_bus_master_add(&ctrl->bus, dev, dev->fwnode); if (ret) { dev_err(dev, "Failed to register Soundwire controller (%d)\n", @@ -1435,12 +1441,6 @@ static int qcom_swrm_probe(struct platform_device *pdev) (ctrl->version >> 24) & 0xff, (ctrl->version >> 16) & 0xff, ctrl->version & 0xffff); - pm_runtime_set_autosuspend_delay(dev, 3000); - pm_runtime_use_autosuspend(dev); - pm_runtime_mark_last_busy(dev); - pm_runtime_set_active(dev); - pm_runtime_enable(dev); - /* Clk stop is not supported on WSA Soundwire masters */ if (ctrl->version <= 0x01030000) { ctrl->clock_stop_not_supported = true; |