Skip to contentSkip to conversation

ARM: mach-shmobile: Runtime PM late init callback

PATCH New Magnus Damm 1 participant 1 message Jul 7, 2011

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 2/5 ARM: mach-shmobile: Runtime PM late init callback

From: Magnus Damm <[email protected]>

Add a mach-shmobile specific callback for SoC-specific code to hook into. By having the late_initcall() in a common place we can have multi-SoC/board support in the same kernel binary.

---

 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 arch/arm/mach-shmobile/pm_runtime.c          |   10 ++++++++++
 2 files changed, 11 insertions(+)
arch/arm/mach-shmobile/include/mach/common.h +1 -0
@@ -12,6 +12,7 @@ extern struct platform_suspend_ops shmob
 struct cpuidle_device;
 extern void (*shmobile_cpuidle_modes[])(void);
 extern void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev);
+extern void (*shmobile_runtime_pm_late_init)(void);
 
 extern void sh7367_init_irq(void);
 extern void sh7367_add_early_devices(void);
arch/arm/mach-shmobile/pm_runtime.c +10 -0
@@ -56,3 +56,13 @@ static int __init sh_pm_runtime_init(voi
 	return 0;
 }
 core_initcall(sh_pm_runtime_init);
+
+void (*shmobile_runtime_pm_late_init)(void);
+
+static int __init sh_pm_runtime_late_init(void)
+{
+	if (shmobile_runtime_pm_late_init)
+		shmobile_runtime_pm_late_init();
+	return 0;
+}
+late_initcall(sh_pm_runtime_late_init);