Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Runtime PM support code
0003  *
0004  *  Copyright (C) 2009-2010 Magnus Damm
0005  *
0006  * This file is subject to the terms and conditions of the GNU General Public
0007  * License.  See the file "COPYING" in the main directory of this archive
0008  * for more details.
0009  */
0010 
0011 #include <linux/init.h>
0012 #include <linux/kernel.h>
0013 #include <linux/io.h>
0014 #include <linux/pm_runtime.h>
0015 #include <linux/pm_domain.h>
0016 #include <linux/pm_clock.h>
0017 #include <linux/platform_device.h>
0018 #include <linux/clk.h>
0019 #include <linux/sh_clk.h>
0020 #include <linux/bitmap.h>
0021 #include <linux/slab.h>
0022 
0023 static struct dev_pm_domain default_pm_domain = {
0024     .ops = {
0025         USE_PM_CLK_RUNTIME_OPS
0026         USE_PLATFORM_PM_SLEEP_OPS
0027     },
0028 };
0029 
0030 static struct pm_clk_notifier_block platform_bus_notifier = {
0031     .pm_domain = &default_pm_domain,
0032     .con_ids = { NULL, },
0033 };
0034 
0035 static int __init sh_pm_runtime_init(void)
0036 {
0037     pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
0038     return 0;
0039 }
0040 core_initcall(sh_pm_runtime_init);