1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/include/linux/clock_cooling.h
7 * Copyright (C) 2013 Texas Instruments Inc.
10 * Highly based on cpu_cooling.c.
11 * Copyright (C) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com)
15 #ifndef __CPU_COOLING_H__
16 #define __CPU_COOLING_H__
19 #include <linux/thermal.h>
20 #include <linux/cpumask.h>
22 #ifdef CONFIG_CLOCK_THERMAL
24 * clock_cooling_register - function to create clock cooling device.
25 * @dev: struct device pointer to the device used as clock cooling device.
26 * @clock_name: string containing the clock used as cooling mechanism.
28 struct thermal_cooling_device *
29 clock_cooling_register(struct device *dev, const char *clock_name);
32 * clock_cooling_unregister - function to remove clock cooling device.
33 * @cdev: thermal cooling device pointer.
35 void clock_cooling_unregister(struct thermal_cooling_device *cdev);
37 unsigned long clock_cooling_get_level(struct thermal_cooling_device *cdev,
39 #else /* !CONFIG_CLOCK_THERMAL */
40 static inline struct thermal_cooling_device *
41 clock_cooling_register(struct device *dev, const char *clock_name)
46 void clock_cooling_unregister(struct thermal_cooling_device *cdev)
50 unsigned long clock_cooling_get_level(struct thermal_cooling_device *cdev,
53 return THERMAL_CSTATE_INVALID;
55 #endif /* CONFIG_CLOCK_THERMAL */
57 #endif /* __CPU_COOLING_H__ */