xref: /openbmc/linux/arch/arm/mach-omap1/pm_bus.c (revision 2f190ac2)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Runtime PM support code for OMAP1
4  *
5  * Author: Kevin Hilman, Deep Root Systems, LLC
6  *
7  * Copyright (C) 2010 Texas Instruments, Inc.
8  */
9 #include <linux/init.h>
10 #include <linux/kernel.h>
11 #include <linux/io.h>
12 #include <linux/pm_runtime.h>
13 #include <linux/pm_clock.h>
14 #include <linux/platform_device.h>
15 #include <linux/mutex.h>
16 #include <linux/clk.h>
17 #include <linux/err.h>
18 
19 #include "soc.h"
20 
21 static struct dev_pm_domain default_pm_domain = {
22 	.ops = {
23 		USE_PM_CLK_RUNTIME_OPS
24 		USE_PLATFORM_PM_SLEEP_OPS
25 	},
26 };
27 
28 static struct pm_clk_notifier_block platform_bus_notifier = {
29 	.pm_domain = &default_pm_domain,
30 	.con_ids = { "ick", "fck", NULL, },
31 };
32 
33 static int __init omap1_pm_runtime_init(void)
34 {
35 	if (!cpu_class_is_omap1())
36 		return -ENODEV;
37 
38 	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
39 
40 	return 0;
41 }
42 core_initcall(omap1_pm_runtime_init);
43