pm_domain.c 869 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  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. static struct dev_pm_domain davinci_pm_domain = {
  17. .ops = {
  18. USE_PM_CLK_RUNTIME_OPS
  19. USE_PLATFORM_PM_SLEEP_OPS
  20. },
  21. };
  22. static struct pm_clk_notifier_block platform_bus_notifier = {
  23. .pm_domain = &davinci_pm_domain,
  24. .con_ids = { "fck", "master", "slave", NULL },
  25. };
  26. static int __init davinci_pm_runtime_init(void)
  27. {
  28. pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
  29. return 0;
  30. }
  31. core_initcall(davinci_pm_runtime_init);