thermal_pause.h 842 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _LINUX_THERMAL_PAUSE_H
  6. #define _LINUX_THERMAL_PAUSE_H
  7. #include <linux/notifier.h>
  8. #include <linux/cpumask.h>
  9. #if IS_ENABLED(CONFIG_QTI_CPU_PAUSE_COOLING_DEVICE)
  10. extern void thermal_pause_notifier_register(struct notifier_block *n);
  11. extern void thermal_pause_notifier_unregister(struct notifier_block *n);
  12. extern const struct cpumask *thermal_paused_cpumask(void);
  13. #else
  14. static inline
  15. void thermal_pause_notifier_register(struct notifier_block *n)
  16. {
  17. }
  18. static inline
  19. void thermal_pause_notifier_unregister(struct notifier_block *n)
  20. {
  21. }
  22. static inline const struct cpumask *thermal_paused_cpumask(void)
  23. {
  24. return cpu_none_mask;
  25. }
  26. #endif /* CONFIG_QTI_CPU_PAUSE_COOLING_DEVICE */
  27. #endif /* _LINUX_THERMAL_PAUSE_H */