pm_bus.c 911 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Runtime PM support code for OMAP1
  4. *
  5. * Author: Kevin Hilman, Deep Root Systems, LLC
  6. *
  7. * Copyright (C) 2010 Texas Instruments, Inc.
  8. */
  9. #include <linux/init.h>
  10. #include <linux/kernel.h>
  11. #include <linux/io.h>
  12. #include <linux/pm_runtime.h>
  13. #include <linux/pm_clock.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/mutex.h>
  16. #include <linux/clk.h>
  17. #include <linux/err.h>
  18. #include "soc.h"
  19. static struct dev_pm_domain default_pm_domain = {
  20. .ops = {
  21. USE_PM_CLK_RUNTIME_OPS
  22. USE_PLATFORM_PM_SLEEP_OPS
  23. },
  24. };
  25. static struct pm_clk_notifier_block platform_bus_notifier = {
  26. .pm_domain = &default_pm_domain,
  27. .con_ids = { "ick", "fck", NULL, },
  28. };
  29. static int __init omap1_pm_runtime_init(void)
  30. {
  31. if (!cpu_class_is_omap1())
  32. return -ENODEV;
  33. pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
  34. return 0;
  35. }
  36. core_initcall(omap1_pm_runtime_init);