return 0;
}
-#if defined(CONFIG_PM)
-static const struct dev_pm_ops arm_cc7x_driver_pm = {
- SET_RUNTIME_PM_OPS(cc_pm_suspend, cc_pm_resume, NULL)
-};
-#endif
-
-#if defined(CONFIG_PM)
-#define CC_DRIVER_RUNTIME_PM (&arm_cc7x_driver_pm)
-#else
-#define CC_DRIVER_RUNTIME_PM NULL
-#endif
-
static const struct of_device_id arm_cc7x_dev_of_match[] = {
{.compatible = "arm,cryptocell-712-ree"},
{}
.driver = {
.name = "cc7xree",
.of_match_table = arm_cc7x_dev_of_match,
- .pm = CC_DRIVER_RUNTIME_PM,
+#ifdef CONFIG_PM
+ .pm = &ccree_pm,
+#endif
},
.probe = cc7x_probe,
.remove = cc7x_remove,
#define POWER_DOWN_ENABLE 0x01
#define POWER_DOWN_DISABLE 0x00
+const struct dev_pm_ops ccree_pm = {
+ SET_RUNTIME_PM_OPS(cc_pm_suspend, cc_pm_resume, NULL)
+};
+
int cc_pm_suspend(struct device *dev)
{
struct cc_drvdata *drvdata = dev_get_drvdata(dev);
void cc_pm_fini(struct cc_drvdata *drvdata);
#if defined(CONFIG_PM)
+
+extern const struct dev_pm_ops ccree_pm;
+
int cc_pm_suspend(struct device *dev);
int cc_pm_resume(struct device *dev);