xref: /linux/drivers/sh/pm_runtime.c (revision 2da68a77)
1 /*
2  * Runtime PM support code
3  *
4  *  Copyright (C) 2009-2010 Magnus Damm
5  *
6  * This file is subject to the terms and conditions of the GNU General Public
7  * License.  See the file "COPYING" in the main directory of this archive
8  * for more details.
9  */
10 
11 #include <linux/init.h>
12 #include <linux/kernel.h>
13 #include <linux/io.h>
14 #include <linux/pm_runtime.h>
15 #include <linux/pm_domain.h>
16 #include <linux/pm_clock.h>
17 #include <linux/platform_device.h>
18 #include <linux/clk.h>
19 #include <linux/sh_clk.h>
20 #include <linux/bitmap.h>
21 #include <linux/slab.h>
22 
23 static struct dev_pm_domain default_pm_domain = {
24 	.ops = {
25 		USE_PM_CLK_RUNTIME_OPS
26 		USE_PLATFORM_PM_SLEEP_OPS
27 	},
28 };
29 
30 static struct pm_clk_notifier_block platform_bus_notifier = {
31 	.pm_domain = &default_pm_domain,
32 	.con_ids = { NULL, },
33 };
34 
35 static int __init sh_pm_runtime_init(void)
36 {
37 	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
38 	return 0;
39 }
40 core_initcall(sh_pm_runtime_init);
41