dt_idle_genpd.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __DT_IDLE_GENPD
  3. #define __DT_IDLE_GENPD
  4. struct device_node;
  5. struct generic_pm_domain;
  6. #ifdef CONFIG_DT_IDLE_GENPD
  7. void dt_idle_pd_free(struct generic_pm_domain *pd);
  8. struct generic_pm_domain *dt_idle_pd_alloc(struct device_node *np,
  9. int (*parse_state)(struct device_node *, u32 *));
  10. int dt_idle_pd_init_topology(struct device_node *np);
  11. int dt_idle_pd_remove_topology(struct device_node *np);
  12. struct device *dt_idle_attach_cpu(int cpu, const char *name);
  13. void dt_idle_detach_cpu(struct device *dev);
  14. #else
  15. static inline void dt_idle_pd_free(struct generic_pm_domain *pd)
  16. {
  17. }
  18. static inline struct generic_pm_domain *dt_idle_pd_alloc(
  19. struct device_node *np,
  20. int (*parse_state)(struct device_node *, u32 *))
  21. {
  22. return NULL;
  23. }
  24. static inline int dt_idle_pd_init_topology(struct device_node *np)
  25. {
  26. return 0;
  27. }
  28. static inline int dt_idle_pd_remove_topology(struct device_node *np)
  29. {
  30. return 0;
  31. }
  32. static inline struct device *dt_idle_attach_cpu(int cpu, const char *name)
  33. {
  34. return NULL;
  35. }
  36. static inline void dt_idle_detach_cpu(struct device *dev)
  37. {
  38. }
  39. #endif
  40. #endif