Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lukasz Majewski and committed by
Eduardo Valentin
f5576e3a afae1442

+31 -9
+3 -9
drivers/thermal/samsung/exynos_tmu.h
··· 26 26 27 27 #include "exynos_thermal_common.h" 28 28 29 - enum 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 - 37 29 enum soc_type { 38 30 SOC_ARCH_EXYNOS3250 = 1, 39 31 SOC_ARCH_EXYNOS4210, ··· 36 44 SOC_ARCH_EXYNOS5420_TRIMINFO, 37 45 SOC_ARCH_EXYNOS5440, 38 46 }; 47 + #include <dt-bindings/thermal/thermal_exynos.h> 39 48 40 49 /** 41 50 * struct exynos_tmu_platform_data ··· 108 115 u8 second_point_trim; 109 116 u8 default_temp_offset; 110 117 111 - enum calibration_type cal_type; 112 118 enum soc_type type; 119 + u32 cal_type; 120 + u32 cal_mode; 113 121 struct freq_clip_table freq_tab[4]; 114 122 unsigned int freq_tab_count; 115 123 };
+28
include/dt-bindings/thermal/thermal_exynos.h
··· 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 */