aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorAmit Daniel Kachhap <amit.daniel@samsung.com>2013-06-24 06:50:45 -0400
committerEduardo Valentin <eduardo.valentin@ti.com>2013-08-13 09:52:03 -0400
commit5000806c119799715f315e482fb60cc61e2536ea (patch)
treedfbc31fd33681211b965bfd0d5d1f61638a08223 /drivers/thermal
parent90542546f057c3cd71601240f25e7f1e5d0eae7f (diff)
thermal: exynos: Fix to set the second point correction value
This patch sets the second point trimming value according to the platform data if the register value is 0. Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Acked-by: Kukjin Kim <kgene.kim@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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 651f4609ebb5..3fac0f92bf91 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -180,10 +180,15 @@ static int exynos_tmu_initialize(struct platform_device *pdev)
180 data->temp_error2 = ((trim_info >> reg->triminfo_85_shift) & 180 data->temp_error2 = ((trim_info >> reg->triminfo_85_shift) &
181 EXYNOS_TMU_TEMP_MASK); 181 EXYNOS_TMU_TEMP_MASK);
182 182
183 if ((pdata->min_efuse_value > data->temp_error1) || 183 if (!data->temp_error1 ||
184 (data->temp_error1 > pdata->max_efuse_value) || 184 (pdata->min_efuse_value > data->temp_error1) ||
185 (data->temp_error2 != 0)) 185 (data->temp_error1 > pdata->max_efuse_value))
186 data->temp_error1 = pdata->efuse_value; 186 data->temp_error1 = pdata->efuse_value & EXYNOS_TMU_TEMP_MASK;
187
188 if (!data->temp_error2)
189 data->temp_error2 =
190 (pdata->efuse_value >> reg->triminfo_85_shift) &
191 EXYNOS_TMU_TEMP_MASK;
187 192
188 if (pdata->max_trigger_level > MAX_THRESHOLD_LEVS) { 193 if (pdata->max_trigger_level > MAX_THRESHOLD_LEVS) {
189 dev_err(&pdev->dev, "Invalid max trigger level\n"); 194 dev_err(&pdev->dev, "Invalid max trigger level\n");