aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/samsung/exynos_tmu.h
diff options
context:
space:
mode:
authorAmit Daniel Kachhap <amit.daniel@samsung.com>2013-06-24 06:50:30 -0400
committerEduardo Valentin <eduardo.valentin@ti.com>2013-08-13 09:52:00 -0400
commitbb34b4c8cfd8538376666f574ed90b03ea2b0446 (patch)
treea7f82deafa7a4f5a79c0324b53041fdea81c2f00 /drivers/thermal/samsung/exynos_tmu.h
parentd0a0ce3e77c795258d47f9163e92d5031d0c5221 (diff)
thermal: exynos: Add extra entries in the tmu platform data
This patch adds entries min_efuse_value, max_efuse_value, default_temp_offset, trigger_type, cal_type, trim_first_point, trim_second_point, max_trigger_level trigger_enable in the TMU platform data structure. Also the driver is modified to use the data passed by these new platform memebers instead of the constant macros. All these changes helps in separating the SOC specific data part from the TMU driver. Acked-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Diffstat (limited to 'drivers/thermal/samsung/exynos_tmu.h')
-rw-r--r--drivers/thermal/samsung/exynos_tmu.h49
1 files changed, 31 insertions, 18 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index 1857609518f2..473acae04f82 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -32,6 +32,11 @@ enum calibration_type {
32 TYPE_NONE, 32 TYPE_NONE,
33}; 33};
34 34
35enum calibration_mode {
36 SW_MODE,
37 HW_MODE,
38};
39
35enum soc_type { 40enum soc_type {
36 SOC_ARCH_EXYNOS4210 = 1, 41 SOC_ARCH_EXYNOS4210 = 1,
37 SOC_ARCH_EXYNOS, 42 SOC_ARCH_EXYNOS,
@@ -57,18 +62,15 @@ enum soc_type {
57 * 3: temperature for trigger_level3 interrupt 62 * 3: temperature for trigger_level3 interrupt
58 * condition for trigger_level3 interrupt: 63 * condition for trigger_level3 interrupt:
59 * current temperature > threshold + trigger_levels[3] 64 * current temperature > threshold + trigger_levels[3]
60 * @trigger_level0_en: 65 * @trigger_type: defines the type of trigger. Possible values are,
61 * 1 = enable trigger_level0 interrupt, 66 * THROTTLE_ACTIVE trigger type
62 * 0 = disable trigger_level0 interrupt 67 * THROTTLE_PASSIVE trigger type
63 * @trigger_level1_en: 68 * SW_TRIP trigger type
64 * 1 = enable trigger_level1 interrupt, 69 * HW_TRIP
65 * 0 = disable trigger_level1 interrupt 70 * @trigger_enable[]: array to denote which trigger levels are enabled.
66 * @trigger_level2_en: 71 * 1 = enable trigger_level[] interrupt,
67 * 1 = enable trigger_level2 interrupt, 72 * 0 = disable trigger_level[] interrupt
68 * 0 = disable trigger_level2 interrupt 73 * @max_trigger_level: max trigger level supported by the TMU
69 * @trigger_level3_en:
70 * 1 = enable trigger_level3 interrupt,
71 * 0 = disable trigger_level3 interrupt
72 * @gain: gain of amplifier in the positive-TC generator block 74 * @gain: gain of amplifier in the positive-TC generator block
73 * 0 <= gain <= 15 75 * 0 <= gain <= 15
74 * @reference_voltage: reference voltage of amplifier 76 * @reference_voltage: reference voltage of amplifier
@@ -78,7 +80,13 @@ enum soc_type {
78 * 000, 100, 101, 110 and 111 can be different modes 80 * 000, 100, 101, 110 and 111 can be different modes
79 * @type: determines the type of SOC 81 * @type: determines the type of SOC
80 * @efuse_value: platform defined fuse value 82 * @efuse_value: platform defined fuse value
83 * @min_efuse_value: minimum valid trimming data
84 * @max_efuse_value: maximum valid trimming data
85 * @first_point_trim: temp value of the first point trimming
86 * @second_point_trim: temp value of the second point trimming
87 * @default_temp_offset: default temperature offset in case of no trimming
81 * @cal_type: calibration type for temperature 88 * @cal_type: calibration type for temperature
89 * @cal_mode: calibration mode for temperature
82 * @freq_clip_table: Table representing frequency reduction percentage. 90 * @freq_clip_table: Table representing frequency reduction percentage.
83 * @freq_tab_count: Count of the above table as frequency reduction may 91 * @freq_tab_count: Count of the above table as frequency reduction may
84 * applicable to only some of the trigger levels. 92 * applicable to only some of the trigger levels.
@@ -88,18 +96,23 @@ enum soc_type {
88struct exynos_tmu_platform_data { 96struct exynos_tmu_platform_data {
89 u8 threshold; 97 u8 threshold;
90 u8 threshold_falling; 98 u8 threshold_falling;
91 u8 trigger_levels[4]; 99 u8 trigger_levels[MAX_TRIP_COUNT];
92 bool trigger_level0_en; 100 enum trigger_type trigger_type[MAX_TRIP_COUNT];
93 bool trigger_level1_en; 101 bool trigger_enable[MAX_TRIP_COUNT];
94 bool trigger_level2_en; 102 u8 max_trigger_level;
95 bool trigger_level3_en;
96
97 u8 gain; 103 u8 gain;
98 u8 reference_voltage; 104 u8 reference_voltage;
99 u8 noise_cancel_mode; 105 u8 noise_cancel_mode;
106
100 u32 efuse_value; 107 u32 efuse_value;
108 u32 min_efuse_value;
109 u32 max_efuse_value;
110 u8 first_point_trim;
111 u8 second_point_trim;
112 u8 default_temp_offset;
101 113
102 enum calibration_type cal_type; 114 enum calibration_type cal_type;
115 enum calibration_mode cal_mode;
103 enum soc_type type; 116 enum soc_type type;
104 struct freq_clip_table freq_tab[4]; 117 struct freq_clip_table freq_tab[4];
105 unsigned int freq_tab_count; 118 unsigned int freq_tab_count;