diff options
Diffstat (limited to 'arch/arm/mach-shmobile/pm_runtime.c')
-rw-r--r-- | arch/arm/mach-shmobile/pm_runtime.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/mach-shmobile/pm_runtime.c b/arch/arm/mach-shmobile/pm_runtime.c index 2d1b67a59e4a..6ec454e1e063 100644 --- a/arch/arm/mach-shmobile/pm_runtime.c +++ b/arch/arm/mach-shmobile/pm_runtime.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/pm_runtime.h> | 16 | #include <linux/pm_runtime.h> |
17 | #include <linux/pm_domain.h> | ||
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
19 | #include <linux/sh_clk.h> | 20 | #include <linux/sh_clk.h> |
@@ -28,31 +29,38 @@ static int default_platform_runtime_idle(struct device *dev) | |||
28 | return pm_runtime_suspend(dev); | 29 | return pm_runtime_suspend(dev); |
29 | } | 30 | } |
30 | 31 | ||
31 | static struct dev_power_domain default_power_domain = { | 32 | static struct dev_pm_domain default_pm_domain = { |
32 | .ops = { | 33 | .ops = { |
33 | .runtime_suspend = pm_runtime_clk_suspend, | 34 | .runtime_suspend = pm_clk_suspend, |
34 | .runtime_resume = pm_runtime_clk_resume, | 35 | .runtime_resume = pm_clk_resume, |
35 | .runtime_idle = default_platform_runtime_idle, | 36 | .runtime_idle = default_platform_runtime_idle, |
36 | USE_PLATFORM_PM_SLEEP_OPS | 37 | USE_PLATFORM_PM_SLEEP_OPS |
37 | }, | 38 | }, |
38 | }; | 39 | }; |
39 | 40 | ||
40 | #define DEFAULT_PWR_DOMAIN_PTR (&default_power_domain) | 41 | #define DEFAULT_PM_DOMAIN_PTR (&default_pm_domain) |
41 | 42 | ||
42 | #else | 43 | #else |
43 | 44 | ||
44 | #define DEFAULT_PWR_DOMAIN_PTR NULL | 45 | #define DEFAULT_PM_DOMAIN_PTR NULL |
45 | 46 | ||
46 | #endif /* CONFIG_PM_RUNTIME */ | 47 | #endif /* CONFIG_PM_RUNTIME */ |
47 | 48 | ||
48 | static struct pm_clk_notifier_block platform_bus_notifier = { | 49 | static struct pm_clk_notifier_block platform_bus_notifier = { |
49 | .pwr_domain = DEFAULT_PWR_DOMAIN_PTR, | 50 | .pm_domain = DEFAULT_PM_DOMAIN_PTR, |
50 | .con_ids = { NULL, }, | 51 | .con_ids = { NULL, }, |
51 | }; | 52 | }; |
52 | 53 | ||
53 | static int __init sh_pm_runtime_init(void) | 54 | static int __init sh_pm_runtime_init(void) |
54 | { | 55 | { |
55 | pm_runtime_clk_add_notifier(&platform_bus_type, &platform_bus_notifier); | 56 | pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier); |
56 | return 0; | 57 | return 0; |
57 | } | 58 | } |
58 | core_initcall(sh_pm_runtime_init); | 59 | core_initcall(sh_pm_runtime_init); |
60 | |||
61 | static int __init sh_pm_runtime_late_init(void) | ||
62 | { | ||
63 | pm_genpd_poweroff_unused(); | ||
64 | return 0; | ||
65 | } | ||
66 | late_initcall(sh_pm_runtime_late_init); | ||