0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <linux/init.h>
0010 #include <linux/pm_runtime.h>
0011 #include <linux/pm_clock.h>
0012 #include <linux/platform_device.h>
0013 #include <linux/of.h>
0014
0015 static struct dev_pm_domain davinci_pm_domain = {
0016 .ops = {
0017 USE_PM_CLK_RUNTIME_OPS
0018 USE_PLATFORM_PM_SLEEP_OPS
0019 },
0020 };
0021
0022 static struct pm_clk_notifier_block platform_bus_notifier = {
0023 .pm_domain = &davinci_pm_domain,
0024 .con_ids = { "fck", "master", "slave", NULL },
0025 };
0026
0027 static int __init davinci_pm_runtime_init(void)
0028 {
0029 if (of_have_populated_dt())
0030 return 0;
0031
0032
0033 pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
0034
0035 return 0;
0036 }
0037 core_initcall(davinci_pm_runtime_init);