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

thermal: exynos: Fix wrong control of power down detection mode for Exynos7

This patch fixes the wrong control of PD_DET_EN (power down detection mode)
for Exynos7 because exynos7_tmu_control() always enables the power down detection
mode regardless 'on' parameter.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>

authored by

Chanwoo Choi and committed by
Lukasz Majewski
42b696e8 5912e264

+2 -1
+2 -1
drivers/thermal/samsung/exynos_tmu.c
··· 682 682 683 683 if (on) { 684 684 con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); 685 + con |= (1 << EXYNOS7_PD_DET_EN_SHIFT); 685 686 interrupt_en = 686 687 (of_thermal_is_trip_valid(tz, 7) 687 688 << EXYNOS7_TMU_INTEN_RISE7_SHIFT) | ··· 705 704 interrupt_en << EXYNOS_TMU_INTEN_FALL0_SHIFT; 706 705 } else { 707 706 con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); 707 + con &= ~(1 << EXYNOS7_PD_DET_EN_SHIFT); 708 708 interrupt_en = 0; /* Disable all interrupts */ 709 709 } 710 - con |= 1 << EXYNOS7_PD_DET_EN_SHIFT; 711 710 712 711 writel(interrupt_en, data->base + EXYNOS7_TMU_REG_INTEN); 713 712 writel(con, data->base + EXYNOS_TMU_REG_CONTROL);