cpuidle-psci.h 672 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __CPUIDLE_PSCI_H
  3. #define __CPUIDLE_PSCI_H
  4. struct device;
  5. struct device_node;
  6. void psci_set_domain_state(u32 state);
  7. int psci_dt_parse_state_node(struct device_node *np, u32 *state);
  8. #ifdef CONFIG_ARM_PSCI_CPUIDLE_DOMAIN
  9. #include "dt_idle_genpd.h"
  10. static inline struct device *psci_dt_attach_cpu(int cpu)
  11. {
  12. return dt_idle_attach_cpu(cpu, "psci");
  13. }
  14. static inline void psci_dt_detach_cpu(struct device *dev)
  15. {
  16. dt_idle_detach_cpu(dev);
  17. }
  18. #else
  19. static inline struct device *psci_dt_attach_cpu(int cpu) { return NULL; }
  20. static inline void psci_dt_detach_cpu(struct device *dev) { }
  21. #endif
  22. #endif /* __CPUIDLE_PSCI_H */