#ifdef CONFIG_PM_SLEEP
static int tegra210_iqc_suspend(struct device *dev)
{
- return 0;
+ if (pm_runtime_status_suspended(dev))
+ return 0;
+
+ return tegra210_iqc_runtime_suspend(dev);
+}
+
+static int tegra210_iqc_resume(struct device *dev)
+{
+ if (pm_runtime_status_suspended(dev))
+ return 0;
+
+ return tegra210_iqc_runtime_resume(dev);
}
#endif
static const struct dev_pm_ops tegra210_iqc_pm_ops = {
SET_RUNTIME_PM_OPS(tegra210_iqc_runtime_suspend,
tegra210_iqc_runtime_resume, NULL)
- SET_SYSTEM_SLEEP_PM_OPS(tegra210_iqc_suspend, NULL)
+ SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_iqc_suspend, tegra210_iqc_resume)
};
static struct platform_driver tegra210_iqc_driver = {