Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / mach-keystone / pm_domain.c
blob5eea01cbecf05104f702ec59cb2b65c64cef4953
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * PM domain driver for Keystone2 devices
5 * Copyright 2013 Texas Instruments, Inc.
6 * Santosh Shilimkar <santosh.shillimkar@ti.com>
8 * Based on Kevins work on DAVINCI SOCs
9 * Kevin Hilman <khilman@linaro.org>
12 #include <linux/init.h>
13 #include <linux/pm_runtime.h>
14 #include <linux/pm_clock.h>
15 #include <linux/platform_device.h>
16 #include <linux/of.h>
18 #include "keystone.h"
20 static struct dev_pm_domain keystone_pm_domain = {
21 .ops = {
22 USE_PM_CLK_RUNTIME_OPS
23 USE_PLATFORM_PM_SLEEP_OPS
27 static struct pm_clk_notifier_block platform_domain_notifier = {
28 .pm_domain = &keystone_pm_domain,
29 .con_ids = { NULL },
32 static const struct of_device_id of_keystone_table[] = {
33 {.compatible = "ti,k2hk"},
34 {.compatible = "ti,k2e"},
35 {.compatible = "ti,k2l"},
36 { /* end of list */ },
39 int __init keystone_pm_runtime_init(void)
41 struct device_node *np;
43 np = of_find_matching_node(NULL, of_keystone_table);
44 if (!np)
45 return 0;
47 pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);
49 return 0;