diff options
Diffstat (limited to 'arch/arm/mach-tegra/include/mach/edp.h')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/edp.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/edp.h b/arch/arm/mach-tegra/include/mach/edp.h new file mode 100644 index 00000000000..48321cae495 --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/edp.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/include/mach/edp.h | ||
3 | * | ||
4 | * Copyright (c) 2011, NVIDIA Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __MACH_EDP_H | ||
22 | #define __MACH_EDP_H | ||
23 | |||
24 | #include <linux/debugfs.h> | ||
25 | |||
26 | struct tegra_edp_entry { | ||
27 | char speedo_id; | ||
28 | char regulator_100mA; | ||
29 | char temperature; | ||
30 | char freq_limits[4]; | ||
31 | }; | ||
32 | |||
33 | struct tegra_edp_limits { | ||
34 | int temperature; | ||
35 | unsigned int freq_limits[4]; | ||
36 | }; | ||
37 | |||
38 | struct system_edp_entry { | ||
39 | char speedo_id; | ||
40 | char power_limit_100mW; | ||
41 | char freq_limits[4]; | ||
42 | }; | ||
43 | |||
44 | #ifdef CONFIG_TEGRA_EDP_LIMITS | ||
45 | |||
46 | |||
47 | int tegra_edp_update_thermal_zone(int temperature); | ||
48 | void tegra_init_cpu_edp_limits(unsigned int regulator_mA); | ||
49 | void tegra_init_system_edp_limits(unsigned int power_limit_mW); | ||
50 | void tegra_get_cpu_edp_limits(const struct tegra_edp_limits **limits, int *size); | ||
51 | unsigned int tegra_get_edp_limit(void); | ||
52 | void tegra_get_system_edp_limits(const unsigned int **limits); | ||
53 | int tegra_system_edp_alarm(bool alarm); | ||
54 | |||
55 | #else | ||
56 | static inline void tegra_init_cpu_edp_limits(int regulator_mA) | ||
57 | {} | ||
58 | static inline void tegra_init_system_edp_limits(int power_limit_mW) | ||
59 | {} | ||
60 | static inline int tegra_edp_update_thermal_zone(int temperature) | ||
61 | { return -1; } | ||
62 | static inline void tegra_get_cpu_edp_limits(struct tegra_edp_limits **limits, | ||
63 | int *size) | ||
64 | {} | ||
65 | static inline unsigned int tegra_get_edp_limit(void) | ||
66 | { return -1; } | ||
67 | static inline void tegra_get_system_edp_limits(unsigned int **limits) | ||
68 | {} | ||
69 | static inline int tegra_system_edp_alarm(bool alarm) | ||
70 | { return -1; } | ||
71 | #endif | ||
72 | |||
73 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | ||
74 | static inline void tegra_edp_throttle_cpu_now(u8 factor) | ||
75 | {} | ||
76 | #else | ||
77 | void tegra_edp_throttle_cpu_now(u8 factor); | ||
78 | #endif | ||
79 | |||
80 | #endif /* __MACH_EDP_H */ | ||