Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8620d2c5 authored by Kevin Hilman's avatar Kevin Hilman
Browse files

ARM: keystone: fix PM domain initcall to be keystone only



initcalls need to have platform specific checks so they are not run in
multi-platform builds.

Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@linaro.org>
parent f797bd4a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/pm_clock.h>
#include <linux/platform_device.h>
#include <linux/clk-provider.h>
#include <linux/of.h>

#ifdef CONFIG_PM_RUNTIME
static int keystone_pm_runtime_suspend(struct device *dev)
@@ -60,8 +61,19 @@ static struct pm_clk_notifier_block platform_domain_notifier = {
	.pm_domain = &keystone_pm_domain,
};

static struct of_device_id of_keystone_table[] = {
	{.compatible = "ti,keystone"},
	{ /* end of list */ },
};

int __init keystone_pm_runtime_init(void)
{
	struct device_node *np;

	np = of_find_matching_node(NULL, of_keystone_table);
	if (!np)
		return 0;

	of_clk_init(NULL);
	pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);