aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@samsung.com>2015-01-23 07:09:55 -0500
committerEduardo Valentin <edubezval@gmail.com>2015-01-24 16:30:22 -0500
commitf5576e3a9ea48334289aaaa711080d09e3405099 (patch)
tree085163e04edc3b8058774b0aff6b8cce221a09e3
parentafae144241a4fb7212e73e21f6c97e12922249ac (diff)
thermal: exynos: Provide thermal_exynos.h file to be included in device tree files
This patch is a preparatory patch to be able to read Exynos thermal configuration from the device tree. It turned out that DTC is not able to interpret enums properly and hence it is necessary to #define those values explicitly. For this reason the ./include/dt-bindings/thermal/thermal_exynos.h file has been introduced. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r--drivers/thermal/samsung/exynos_tmu.h12
-rw-r--r--include/dt-bindings/thermal/thermal_exynos.h28
2 files changed, 31 insertions, 9 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index da3009bff6c4..7f880d2e53f5 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -26,14 +26,6 @@
26 26
27#include "exynos_thermal_common.h" 27#include "exynos_thermal_common.h"
28 28
29enum calibration_type {
30 TYPE_ONE_POINT_TRIMMING,
31 TYPE_ONE_POINT_TRIMMING_25,
32 TYPE_ONE_POINT_TRIMMING_85,
33 TYPE_TWO_POINT_TRIMMING,
34 TYPE_NONE,
35};
36
37enum soc_type { 29enum soc_type {
38 SOC_ARCH_EXYNOS3250 = 1, 30 SOC_ARCH_EXYNOS3250 = 1,
39 SOC_ARCH_EXYNOS4210, 31 SOC_ARCH_EXYNOS4210,
@@ -44,6 +36,7 @@ enum soc_type {
44 SOC_ARCH_EXYNOS5420_TRIMINFO, 36 SOC_ARCH_EXYNOS5420_TRIMINFO,
45 SOC_ARCH_EXYNOS5440, 37 SOC_ARCH_EXYNOS5440,
46}; 38};
39#include <dt-bindings/thermal/thermal_exynos.h>
47 40
48/** 41/**
49 * struct exynos_tmu_platform_data 42 * struct exynos_tmu_platform_data
@@ -115,8 +108,9 @@ struct exynos_tmu_platform_data {
115 u8 second_point_trim; 108 u8 second_point_trim;
116 u8 default_temp_offset; 109 u8 default_temp_offset;
117 110
118 enum calibration_type cal_type;
119 enum soc_type type; 111 enum soc_type type;
112 u32 cal_type;
113 u32 cal_mode;
120 struct freq_clip_table freq_tab[4]; 114 struct freq_clip_table freq_tab[4];
121 unsigned int freq_tab_count; 115 unsigned int freq_tab_count;
122}; 116};
diff --git a/include/dt-bindings/thermal/thermal_exynos.h b/include/dt-bindings/thermal/thermal_exynos.h
new file mode 100644
index 000000000000..0646500bca69
--- /dev/null
+++ b/include/dt-bindings/thermal/thermal_exynos.h
@@ -0,0 +1,28 @@
1/*
2 * thermal_exynos.h - Samsung EXYNOS TMU device tree definitions
3 *
4 * Copyright (C) 2014 Samsung Electronics
5 * Lukasz Majewski <l.majewski@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#ifndef _EXYNOS_THERMAL_TMU_DT_H
20#define _EXYNOS_THERMAL_TMU_DT_H
21
22#define TYPE_ONE_POINT_TRIMMING 0
23#define TYPE_ONE_POINT_TRIMMING_25 1
24#define TYPE_ONE_POINT_TRIMMING_85 2
25#define TYPE_TWO_POINT_TRIMMING 3
26#define TYPE_NONE 4
27
28#endif /* _EXYNOS_THERMAL_TMU_DT_H */