1 // SPDX-License-Identifier: GPL-2.0-only
3 * Runtime PM support code for DaVinci
7 * Copyright (C) 2012 Texas Instruments, Inc.
9 #include <linux/init.h>
10 #include <linux/pm_runtime.h>
11 #include <linux/pm_clock.h>
12 #include <linux/platform_device.h>
15 static struct dev_pm_domain davinci_pm_domain
= {
17 USE_PM_CLK_RUNTIME_OPS
18 USE_PLATFORM_PM_SLEEP_OPS
22 static struct pm_clk_notifier_block platform_bus_notifier
= {
23 .pm_domain
= &davinci_pm_domain
,
24 .con_ids
= { "fck", "master", "slave", NULL
},
27 static int __init
davinci_pm_runtime_init(void)
29 if (of_have_populated_dt())
32 /* Use pm_clk as fallback if we're not using genpd. */
33 pm_clk_add_notifier(&platform_bus_type
, &platform_bus_notifier
);
37 core_initcall(davinci_pm_runtime_init
);