To be able to deactivate resourses in suspend, the resourses must
first be surely active. This is done with a pm_runtime_get_sync.
Once the resourses are restored to active state again in resume,
the runtime pm usage count can be decreased with a pm_runtime_put.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
dev_warn(dev, "cannot suspend master\n");
return ret;
}
+
+ pm_runtime_get_sync(dev);
pl022_suspend_resources(pl022);
dev_dbg(dev, "suspended\n");
int ret;
pl022_resume_resources(pl022);
+ pm_runtime_put(dev);
/* Start the queue running */
ret = spi_master_resume(pl022->master);