diff options
Diffstat (limited to 'arch/arm/mach-tegra/include/mach/thermal.h')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/thermal.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/thermal.h b/arch/arm/mach-tegra/include/mach/thermal.h new file mode 100644 index 00000000000..ab7b34492d9 --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/thermal.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/thermal.h | ||
3 | * | ||
4 | * Copyright (C) 2010-2011 NVIDIA Corporation. | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_THERMAL_H | ||
18 | #define __MACH_THERMAL_H | ||
19 | |||
20 | /* All units in millicelsius */ | ||
21 | struct tegra_thermal_data { | ||
22 | long temp_throttle; | ||
23 | long temp_shutdown; | ||
24 | long temp_offset; | ||
25 | #ifdef CONFIG_TEGRA_EDP_LIMITS | ||
26 | long edp_offset; | ||
27 | long hysteresis_edp; | ||
28 | #endif | ||
29 | #ifdef CONFIG_TEGRA_THERMAL_SYSFS | ||
30 | int tc1; | ||
31 | int tc2; | ||
32 | long passive_delay; | ||
33 | #else | ||
34 | long hysteresis_throttle; | ||
35 | #endif | ||
36 | }; | ||
37 | |||
38 | struct tegra_thermal_device { | ||
39 | char *name; | ||
40 | void *data; | ||
41 | long offset; | ||
42 | int (*get_temp) (void *, long *); | ||
43 | int (*get_temp_low)(void *, long *); | ||
44 | int (*set_limits) (void *, long, long); | ||
45 | int (*set_alert)(void *, void (*)(void *), void *); | ||
46 | int (*set_shutdown_temp)(void *, long); | ||
47 | }; | ||
48 | |||
49 | #ifndef CONFIG_ARCH_TEGRA_2x_SOC | ||
50 | int tegra_thermal_init(struct tegra_thermal_data *data); | ||
51 | int tegra_thermal_set_device(struct tegra_thermal_device *device); | ||
52 | int tegra_thermal_exit(void); | ||
53 | #else | ||
54 | static inline int tegra_thermal_init(struct tegra_thermal_data *data) | ||
55 | { return 0; } | ||
56 | static inline int tegra_thermal_set_device(struct tegra_thermal_device *dev) | ||
57 | { return 0; } | ||
58 | static inline int tegra_thermal_exit(void) | ||
59 | { return 0; } | ||
60 | #endif | ||
61 | |||
62 | #endif /* __MACH_THERMAL_H */ | ||