blob: 78eac2c0c146bb91a7b51965e2685e3106f67eef [file] [log] [blame]
Kevin Hilmance9dcb82012-05-31 09:59:53 -07001/*
2 * Runtime PM support code for DaVinci
3 *
4 * Author: Kevin Hilman
5 *
6 * Copyright (C) 2012 Texas Instruments, Inc.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12#include <linux/init.h>
13#include <linux/pm_runtime.h>
14#include <linux/pm_clock.h>
15#include <linux/platform_device.h>
16
Kevin Hilmance9dcb82012-05-31 09:59:53 -070017static struct dev_pm_domain davinci_pm_domain = {
18 .ops = {
Rajendra Nayakea6f8332015-04-23 14:03:12 +053019 USE_PM_CLK_RUNTIME_OPS
Kevin Hilmance9dcb82012-05-31 09:59:53 -070020 USE_PLATFORM_PM_SLEEP_OPS
21 },
22};
23
24static struct pm_clk_notifier_block platform_bus_notifier = {
25 .pm_domain = &davinci_pm_domain,
Lad, Prabhakar9a3e89b2013-03-22 04:53:12 -030026 .con_ids = { "fck", "master", "slave", NULL },
Kevin Hilmance9dcb82012-05-31 09:59:53 -070027};
28
29static int __init davinci_pm_runtime_init(void)
30{
31 pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
32
33 return 0;
34}
35core_initcall(davinci_pm_runtime_init);