Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[deliverable/linux.git] / arch / arm / mach-keystone / pm_domain.c
CommitLineData
fc20ffe1
SS
1/*
2 * PM domain driver for Keystone2 devices
3 *
4 * Copyright 2013 Texas Instruments, Inc.
5 * Santosh Shilimkar <santosh.shillimkar@ti.com>
6 *
7 * Based on Kevins work on DAVINCI SOCs
8 * Kevin Hilman <khilman@linaro.org>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms and conditions of the GNU General Public License,
12 * version 2, as published by the Free Software Foundation.
13 */
14
15#include <linux/init.h>
16#include <linux/pm_runtime.h>
17#include <linux/pm_clock.h>
18#include <linux/platform_device.h>
8620d2c5 19#include <linux/of.h>
fc20ffe1 20
fc20ffe1
SS
21static struct dev_pm_domain keystone_pm_domain = {
22 .ops = {
1f51b0c6 23 USE_PM_CLK_RUNTIME_OPS
fc20ffe1
SS
24 USE_PLATFORM_PM_SLEEP_OPS
25 },
26};
27
28static struct pm_clk_notifier_block platform_domain_notifier = {
29 .pm_domain = &keystone_pm_domain,
30};
31
444d2d33 32static const struct of_device_id of_keystone_table[] = {
8620d2c5
KH
33 {.compatible = "ti,keystone"},
34 { /* end of list */ },
35};
36
fc20ffe1
SS
37int __init keystone_pm_runtime_init(void)
38{
8620d2c5
KH
39 struct device_node *np;
40
41 np = of_find_matching_node(NULL, of_keystone_table);
42 if (!np)
43 return 0;
44
fc20ffe1
SS
45 pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);
46
47 return 0;
48}
This page took 0.122585 seconds and 5 git commands to generate.