Blame view

drivers/sh/pm_runtime.c 951 Bytes
f14c4f141   Magnus Damm   ARM: mach-shmobil...
1
  /*
d03299ee6   Paul Mundt   drivers: sh: Kill...
2
   * Runtime PM support code
f14c4f141   Magnus Damm   ARM: mach-shmobil...
3
4
5
6
7
8
9
10
11
12
13
14
   *
   *  Copyright (C) 2009-2010 Magnus Damm
   *
   * This file is subject to the terms and conditions of the GNU General Public
   * License.  See the file "COPYING" in the main directory of this archive
   * for more details.
   */
  
  #include <linux/init.h>
  #include <linux/kernel.h>
  #include <linux/io.h>
  #include <linux/pm_runtime.h>
796204142   Rafael J. Wysocki   ARM / shmobile: U...
15
  #include <linux/pm_domain.h>
b5e8d269d   Rafael J. Wysocki   PM: Move clock-re...
16
  #include <linux/pm_clock.h>
f14c4f141   Magnus Damm   ARM: mach-shmobil...
17
18
19
20
  #include <linux/platform_device.h>
  #include <linux/clk.h>
  #include <linux/sh_clk.h>
  #include <linux/bitmap.h>
1d2b71f61   Rafael J. Wysocki   PM / Runtime: Add...
21
  #include <linux/slab.h>
f14c4f141   Magnus Damm   ARM: mach-shmobil...
22

564b905ab   Rafael J. Wysocki   PM / Domains: Ren...
23
  static struct dev_pm_domain default_pm_domain = {
38ade3a1f   Rafael J. Wysocki   shmobile: Use pow...
24
  	.ops = {
d2c4b43d8   Rajendra Nayak   drivers: sh: remo...
25
  		USE_PM_CLK_RUNTIME_OPS
38ade3a1f   Rafael J. Wysocki   shmobile: Use pow...
26
27
28
  		USE_PLATFORM_PM_SLEEP_OPS
  	},
  };
85eb8c8d0   Rafael J. Wysocki   PM / Runtime: Gen...
29
  static struct pm_clk_notifier_block platform_bus_notifier = {
d2c4b43d8   Rajendra Nayak   drivers: sh: remo...
30
  	.pm_domain = &default_pm_domain,
85eb8c8d0   Rafael J. Wysocki   PM / Runtime: Gen...
31
  	.con_ids = { NULL, },
f14c4f141   Magnus Damm   ARM: mach-shmobil...
32
33
34
35
  };
  
  static int __init sh_pm_runtime_init(void)
  {
3d5c30367   Rafael J. Wysocki   PM: Rename clock ...
36
  	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
f14c4f141   Magnus Damm   ARM: mach-shmobil...
37
38
39
  	return 0;
  }
  core_initcall(sh_pm_runtime_init);