android_kernel_xiaomi_sm8450/include/linux/thermal_pause.h
Pavankumar Kondeti 30fb6ea0f2 drivers: thermal: thermal-pause: Export pause notifier
Hyp core_ctl driver require notifications when CPUs are paused
due to thermal conditions. Export the relevant functions.

Change-Id: Ib516c21ae84ccd5971a622eb14800f848537063b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2021-02-27 08:58:18 +05:30

34 lines
842 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
*/
#ifndef _LINUX_THERMAL_PAUSE_H
#define _LINUX_THERMAL_PAUSE_H
#include <linux/notifier.h>
#include <linux/cpumask.h>
#if IS_ENABLED(CONFIG_QTI_CPU_PAUSE_COOLING_DEVICE)
extern void thermal_pause_notifier_register(struct notifier_block *n);
extern void thermal_pause_notifier_unregister(struct notifier_block *n);
extern const struct cpumask *thermal_paused_cpumask(void);
#else
static inline
void thermal_pause_notifier_register(struct notifier_block *n)
{
}
static inline
void thermal_pause_notifier_unregister(struct notifier_block *n)
{
}
static inline const struct cpumask *thermal_paused_cpumask(void)
{
return cpu_none_mask;
}
#endif /* CONFIG_QTI_CPU_PAUSE_COOLING_DEVICE */
#endif /* _LINUX_THERMAL_PAUSE_H */