return crb_cmd_ready(dev, priv);
}
+
+static int crb_pm_suspend(struct device *dev)
+{
+ int ret;
+
+ ret = tpm_pm_suspend(dev);
+ if (ret)
+ return ret;
+
+ return crb_pm_runtime_suspend(dev);
+}
+
+static int crb_pm_resume(struct device *dev)
+{
+ int ret;
+
+ ret = crb_pm_runtime_resume(dev);
+ if (ret)
+ return ret;
+
+ return tpm_pm_resume(dev);
+}
+
#endif /* CONFIG_PM */
static const struct dev_pm_ops crb_pm = {
- SET_SYSTEM_SLEEP_PM_OPS(tpm_pm_suspend, tpm_pm_resume)
+ SET_SYSTEM_SLEEP_PM_OPS(crb_pm_suspend, crb_pm_resume)
SET_RUNTIME_PM_OPS(crb_pm_runtime_suspend, crb_pm_runtime_resume, NULL)
};