|
@@ -32,11 +32,13 @@
|
|
|
#include "pm.h"
|
|
|
#include "twl-common.h"
|
|
|
|
|
|
+#ifdef CONFIG_SUSPEND
|
|
|
/*
|
|
|
* omap_pm_suspend: points to a function that does the SoC-specific
|
|
|
* suspend work
|
|
|
*/
|
|
|
-int (*omap_pm_suspend)(void);
|
|
|
+static int (*omap_pm_suspend)(void);
|
|
|
+#endif
|
|
|
|
|
|
#ifdef CONFIG_PM
|
|
|
/**
|
|
@@ -243,6 +245,15 @@ static const struct platform_suspend_ops omap_pm_ops = {
|
|
|
.valid = suspend_valid_only_mem,
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * omap_common_suspend_init - Set common suspend routines for OMAP SoCs
|
|
|
+ * @pm_suspend: function pointer to SoC specific suspend function
|
|
|
+ */
|
|
|
+void omap_common_suspend_init(void *pm_suspend)
|
|
|
+{
|
|
|
+ omap_pm_suspend = pm_suspend;
|
|
|
+ suspend_set_ops(&omap_pm_ops);
|
|
|
+}
|
|
|
#endif /* CONFIG_SUSPEND */
|
|
|
|
|
|
static void __init omap3_init_voltages(void)
|
|
@@ -310,9 +321,5 @@ int __init omap2_common_pm_late_init(void)
|
|
|
/* cpufreq dummy device instantiation */
|
|
|
omap_init_cpufreq();
|
|
|
|
|
|
-#ifdef CONFIG_SUSPEND
|
|
|
- suspend_set_ops(&omap_pm_ops);
|
|
|
-#endif
|
|
|
-
|
|
|
return 0;
|
|
|
}
|