From: Soomin Kim Date: Mon, 25 Jul 2016 07:06:25 +0000 (+0900) Subject: [8895] thermal: samsung: Fix threshold offset X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d8391a8f7c92759eccf5593bd667040edd0e970;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [8895] thermal: samsung: Fix threshold offset If sensor number is over 1, threshold register offset should be start from 0x170. Change-Id: Ia995e4c42cec74b79395900699fbb70b66be30e2 Signed-off-by: Soomin Kim --- diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 4172b72ebc38..011ef77e30ec 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -85,7 +85,7 @@ #define EXYNOS_THD_TEMP_RISE7_6 0x50 #define EXYNOS_THD_TEMP_FALL7_6 0x60 -#define EXYNOS_THD_TEMP_R_OFFSET 0x120 +#define EXYNOS_THD_TEMP_R_OFFSET 0x100 #define EXYNOS_TMU_INTEN_RISE0_SHIFT 0 #define EXYNOS_TMU_INTEN_RISE1_SHIFT 1 #define EXYNOS_TMU_INTEN_RISE2_SHIFT 2 @@ -599,7 +599,8 @@ static int exynos8895_tmu_initialize(struct platform_device *pdev) bit_off = ((8 - i) % 2); if (data->sensor_info[j].sensor_num > 0) - reg_off = reg_off + EXYNOS_THD_TEMP_R_OFFSET; + reg_off = reg_off + EXYNOS_THD_TEMP_R_OFFSET + + data->sensor_info[j].sensor_num * 0x20; tz->ops->get_trip_temp(tz, i, &temp); temp /= MCELSIUS;