Skip to content

Commit

Permalink
thermal: exynos: Provide thermal_exynos.h file to be included in devi…
Browse files Browse the repository at this point in the history
…ce 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>
  • Loading branch information
Lukasz Majewski authored and Eduardo Valentin committed Jan 24, 2015
1 parent afae144 commit f5576e3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/thermal/samsung/exynos_tmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@

#include "exynos_thermal_common.h"

enum calibration_type {
TYPE_ONE_POINT_TRIMMING,
TYPE_ONE_POINT_TRIMMING_25,
TYPE_ONE_POINT_TRIMMING_85,
TYPE_TWO_POINT_TRIMMING,
TYPE_NONE,
};

enum soc_type {
SOC_ARCH_EXYNOS3250 = 1,
SOC_ARCH_EXYNOS4210,
Expand All @@ -44,6 +36,7 @@ enum soc_type {
SOC_ARCH_EXYNOS5420_TRIMINFO,
SOC_ARCH_EXYNOS5440,
};
#include <dt-bindings/thermal/thermal_exynos.h>

/**
* struct exynos_tmu_platform_data
Expand Down Expand Up @@ -115,8 +108,9 @@ struct exynos_tmu_platform_data {
u8 second_point_trim;
u8 default_temp_offset;

enum calibration_type cal_type;
enum soc_type type;
u32 cal_type;
u32 cal_mode;
struct freq_clip_table freq_tab[4];
unsigned int freq_tab_count;
};
Expand Down
28 changes: 28 additions & 0 deletions include/dt-bindings/thermal/thermal_exynos.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* thermal_exynos.h - Samsung EXYNOS TMU device tree definitions
*
* Copyright (C) 2014 Samsung Electronics
* Lukasz Majewski <l.majewski@samsung.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/

#ifndef _EXYNOS_THERMAL_TMU_DT_H
#define _EXYNOS_THERMAL_TMU_DT_H

#define TYPE_ONE_POINT_TRIMMING 0
#define TYPE_ONE_POINT_TRIMMING_25 1
#define TYPE_ONE_POINT_TRIMMING_85 2
#define TYPE_TWO_POINT_TRIMMING 3
#define TYPE_NONE 4

#endif /* _EXYNOS_THERMAL_TMU_DT_H */

0 comments on commit f5576e3

Please sign in to comment.