Skip to content

Commit

Permalink
thermal: exynos: Fix to set the second point correction value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amit Daniel Kachhap authored and Eduardo Valentin committed Aug 13, 2013
1 parent 9054254 commit 5000806
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions drivers/thermal/samsung/exynos_tmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,15 @@ static int exynos_tmu_initialize(struct platform_device *pdev)
data->temp_error2 = ((trim_info >> reg->triminfo_85_shift) &
EXYNOS_TMU_TEMP_MASK);

if ((pdata->min_efuse_value > data->temp_error1) ||
(data->temp_error1 > pdata->max_efuse_value) ||
(data->temp_error2 != 0))
data->temp_error1 = pdata->efuse_value;
if (!data->temp_error1 ||
(pdata->min_efuse_value > data->temp_error1) ||
(data->temp_error1 > pdata->max_efuse_value))
data->temp_error1 = pdata->efuse_value & EXYNOS_TMU_TEMP_MASK;

if (!data->temp_error2)
data->temp_error2 =
(pdata->efuse_value >> reg->triminfo_85_shift) &
EXYNOS_TMU_TEMP_MASK;

if (pdata->max_trigger_level > MAX_THRESHOLD_LEVS) {
dev_err(&pdev->dev, "Invalid max trigger level\n");
Expand Down

0 comments on commit 5000806

Please sign in to comment.