Linux 5.7.6
[linux/fpc-iii.git] / arch / arm / mach-davinci / pm_domain.c
blobe251fd593bfd18be4c26e7fccb5a8c0809825c0a
1 /*
2 * Runtime PM support code for DaVinci
4 * Author: Kevin Hilman
6 * Copyright (C) 2012 Texas Instruments, Inc.
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
12 #include <linux/init.h>
13 #include <linux/pm_runtime.h>
14 #include <linux/pm_clock.h>
15 #include <linux/platform_device.h>
16 #include <linux/of.h>
18 static struct dev_pm_domain davinci_pm_domain = {
19 .ops = {
20 USE_PM_CLK_RUNTIME_OPS
21 USE_PLATFORM_PM_SLEEP_OPS
25 static struct pm_clk_notifier_block platform_bus_notifier = {
26 .pm_domain = &davinci_pm_domain,
27 .con_ids = { "fck", "master", "slave", NULL },
30 static int __init davinci_pm_runtime_init(void)
32 if (of_have_populated_dt())
33 return 0;
35 /* Use pm_clk as fallback if we're not using genpd. */
36 pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
38 return 0;
40 core_initcall(davinci_pm_runtime_init);