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

thermal: exynos: Move exynos_thermal.h from include/* to driver/* folder

This patch renames and moves include/linux/platform_data/exynos_thermal.h to
drivers/thermal/samsung/exynos_tmu.h. This file movement is needed as exynos
SOC's are not supporting non-DT based platforms and this file now just contains
exynos tmu driver related definations.
Also struct freq_clip_table is now moved to exynos_thermal_common.c as it fixes
the compilation issue occuring because now this new tmu header file is included
in tmu driver c file and not in the common thermal header file.

Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

authored by

Amit Daniel Kachhap and committed by
Eduardo Valentin
0c1836a6 59dfa54c

+24 -21
-1
drivers/thermal/samsung/exynos_thermal_common.c
··· 22 22 23 23 #include <linux/cpu_cooling.h> 24 24 #include <linux/err.h> 25 - #include <linux/platform_data/exynos_thermal.h> 26 25 #include <linux/slab.h> 27 26 #include <linux/thermal.h> 28 27
+16
drivers/thermal/samsung/exynos_thermal_common.h
··· 44 44 45 45 #define EXYNOS_ZONE_COUNT 3 46 46 47 + /** 48 + * struct freq_clip_table 49 + * @freq_clip_max: maximum frequency allowed for this cooling state. 50 + * @temp_level: Temperature level at which the temperature clipping will 51 + * happen. 52 + * @mask_val: cpumask of the allowed cpu's where the clipping will take place. 53 + * 54 + * This structure is required to be filled and passed to the 55 + * cpufreq_cooling_unregister function. 56 + */ 57 + struct freq_clip_table { 58 + unsigned int freq_clip_max; 59 + unsigned int temp_level; 60 + const struct cpumask *mask_val; 61 + }; 62 + 47 63 struct thermal_trip_point_conf { 48 64 int trip_val[MAX_TRIP_COUNT]; 49 65 int trip_count;
+1 -1
drivers/thermal/samsung/exynos_tmu.c
··· 27 27 #include <linux/module.h> 28 28 #include <linux/of.h> 29 29 #include <linux/platform_device.h> 30 - #include <linux/platform_data/exynos_thermal.h> 31 30 32 31 #include "exynos_thermal_common.h" 32 + #include "exynos_tmu.h" 33 33 34 34 /* Exynos generic registers */ 35 35 #define EXYNOS_TMU_REG_TRIMINFO 0x0
+7 -19
include/linux/platform_data/exynos_thermal.h drivers/thermal/samsung/exynos_tmu.h
··· 1 1 /* 2 - * exynos_thermal.h - Samsung EXYNOS TMU (Thermal Management Unit) 2 + * exynos_tmu.h - Samsung EXYNOS TMU (Thermal Management Unit) 3 3 * 4 4 * Copyright (C) 2011 Samsung Electronics 5 5 * Donggeun Kim <dg77.kim@samsung.com> 6 + * Amit Daniel Kachhap <amit.daniel@samsung.com> 6 7 * 7 8 * This program is free software; you can redistribute it and/or modify 8 9 * it under the terms of the GNU General Public License as published by ··· 20 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 20 */ 22 21 23 - #ifndef _LINUX_EXYNOS_THERMAL_H 24 - #define _LINUX_EXYNOS_THERMAL_H 22 + #ifndef _EXYNOS_TMU_H 23 + #define _EXYNOS_TMU_H 25 24 #include <linux/cpu_cooling.h> 25 + 26 + #include "exynos_thermal_common.h" 26 27 27 28 enum calibration_type { 28 29 TYPE_ONE_POINT_TRIMMING, ··· 35 32 enum soc_type { 36 33 SOC_ARCH_EXYNOS4210 = 1, 37 34 SOC_ARCH_EXYNOS, 38 - }; 39 - /** 40 - * struct freq_clip_table 41 - * @freq_clip_max: maximum frequency allowed for this cooling state. 42 - * @temp_level: Temperature level at which the temperature clipping will 43 - * happen. 44 - * @mask_val: cpumask of the allowed cpu's where the clipping will take place. 45 - * 46 - * This structure is required to be filled and passed to the 47 - * cpufreq_cooling_unregister function. 48 - */ 49 - struct freq_clip_table { 50 - unsigned int freq_clip_max; 51 - unsigned int temp_level; 52 - const struct cpumask *mask_val; 53 35 }; 54 36 55 37 /** ··· 104 116 struct freq_clip_table freq_tab[4]; 105 117 unsigned int freq_tab_count; 106 118 }; 107 - #endif /* _LINUX_EXYNOS_THERMAL_H */ 119 + #endif /* _EXYNOS_TMU_H */