USB: bcma: support old USB 2.0 controller on Northstar devices
[linux-2.6/btrfs-unstable.git] / include / linux / clock_cooling.h
blob4d1019d56f7f6fe9b61cef89562709505a1dce4a
1 /*
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__
26 #include <linux/of.h>
27 #include <linux/thermal.h>
28 #include <linux/cpumask.h>
30 #ifdef CONFIG_CLOCK_THERMAL
31 /**
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);
39 /**
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,
46 unsigned long freq);
47 #else /* !CONFIG_CLOCK_THERMAL */
48 static inline struct thermal_cooling_device *
49 clock_cooling_register(struct device *dev, const char *clock_name)
51 return NULL;
53 static inline
54 void clock_cooling_unregister(struct thermal_cooling_device *cdev)
57 static inline
58 unsigned long clock_cooling_get_level(struct thermal_cooling_device *cdev,
59 unsigned long freq)
61 return THERMAL_CSTATE_INVALID;
63 #endif /* CONFIG_CLOCK_THERMAL */
65 #endif /* __CPU_COOLING_H__ */