|
@@ -882,8 +882,25 @@ static int __maybe_unused malidp_pm_resume(struct device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static int __maybe_unused malidp_pm_suspend_late(struct device *dev)
|
|
|
+{
|
|
|
+ if (!pm_runtime_status_suspended(dev)) {
|
|
|
+ malidp_runtime_pm_suspend(dev);
|
|
|
+ pm_runtime_set_suspended(dev);
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int __maybe_unused malidp_pm_resume_early(struct device *dev)
|
|
|
+{
|
|
|
+ malidp_runtime_pm_resume(dev);
|
|
|
+ pm_runtime_set_active(dev);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
static const struct dev_pm_ops malidp_pm_ops = {
|
|
|
SET_SYSTEM_SLEEP_PM_OPS(malidp_pm_suspend, malidp_pm_resume) \
|
|
|
+ SET_LATE_SYSTEM_SLEEP_PM_OPS(malidp_pm_suspend_late, malidp_pm_resume_early) \
|
|
|
SET_RUNTIME_PM_OPS(malidp_runtime_pm_suspend, malidp_runtime_pm_resume, NULL)
|
|
|
};
|
|
|
|