2 * linux/include/linux/clock_cooling.h
4 * Copyright (C) 2014 Eduardo Valentin <edubezval@gmail.com>
6 * Copyright (C) 2013 Texas Instruments Inc.
7 * Contact: Eduardo Valentin <eduardo.valentin@ti.com>
9 * Highly based on cpu_cooling.c.
10 * Copyright (C) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com)
11 * Copyright (C) 2012 Amit Daniel <amit.kachhap@linaro.org>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; version 2 of the License.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
23 #ifndef __CPU_COOLING_H__
24 #define __CPU_COOLING_H__
27 #include <linux/thermal.h>
28 #include <linux/cpumask.h>
30 #ifdef CONFIG_CLOCK_THERMAL
32 * clock_cooling_register - function to create clock cooling device.
33 * @dev: struct device pointer to the device used as clock cooling device.
34 * @clock_name: string containing the clock used as cooling mechanism.
36 struct thermal_cooling_device
*
37 clock_cooling_register(struct device
*dev
, const char *clock_name
);
40 * clock_cooling_unregister - function to remove clock cooling device.
41 * @cdev: thermal cooling device pointer.
43 void clock_cooling_unregister(struct thermal_cooling_device
*cdev
);
45 unsigned long clock_cooling_get_level(struct thermal_cooling_device
*cdev
,
47 #else /* !CONFIG_CLOCK_THERMAL */
48 static inline struct thermal_cooling_device
*
49 clock_cooling_register(struct device
*dev
, const char *clock_name
)
54 void clock_cooling_unregister(struct thermal_cooling_device
*cdev
)
58 unsigned long clock_cooling_get_level(struct thermal_cooling_device
*cdev
,
61 return THERMAL_CSTATE_INVALID
;
63 #endif /* CONFIG_CLOCK_THERMAL */
65 #endif /* __CPU_COOLING_H__ */