Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752779AbbBXE5K (ORCPT ); Mon, 23 Feb 2015 23:57:10 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:54495 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752583AbbBXE5E (ORCPT ); Mon, 23 Feb 2015 23:57:04 -0500 X-AuditID: cbfee68f-f791c6d000004834-0a-54ec049d850c From: Chanwoo Choi To: rui.zhang@intel.com, edubezval@gmail.com Cc: kgene@kernel.org, b.zolnierkie@samsung.com, amit.daniel@samsung.com, l.majewski@samsung.com, a.kesavan@samsung.com, inki.dae@samsung.com, kyungmin.park@samsung.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Chanwoo Choi Subject: [PATCH 1/2] thermal: exynos: Fix wrong control of power down detection mode for Exynos7 Date: Tue, 24 Feb 2015 13:56:54 +0900 Message-id: <1424753815-15113-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.5.5 In-reply-to: <1424753815-15113-1-git-send-email-cw00.choi@samsung.com> References: <1424753815-15113-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42JZI2JSqDuX5U2Iwd/zZhaP1yxmsmi4GmKx ccZ6VovrX56zWsy/co3VYtL9CSwW/Y9fM1ucbXrDbvHm4WZGi02PgRKXd81hs/jce4TRYsb5 fUwWTx72sTnweeycdZfdY/Gel0wem1Z1snlsXlLv0bdlFaPH501yAWxRXDYpqTmZZalF+nYJ XBmrtq5hLPjPVfHt9n/WBsZZnF2MHBwSAiYSt/bndzFyApliEhfurWfrYuTiEBJYyiixq/8Q E0TCRGL2/L+MEInpjBLT7p1jgnCamCRmnu5kB6liE9CS2P/iBhuILSKgI3H4yVNmkCJmgWtM Ekc/nAIbJSyQJNGwcxYjiM0ioCpx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Cj AAejEg9vQ+6rECHWxLLiytxDjBIczEoivGlPX4cI8aYkVlalFuXHF5XmpBYfYjQFumois5Ro cj4wYeSVxBsam5gZWRqZG1oYGZsrifMq2beFCAmkJ5akZqemFqQWwfQxcXBKNTAWummYLNyt 4vL6T2N2dGDjkhmd80WEl0bw2D27meaXo3V2HZPTrNfrQooPLj1kWfri8m6J5Z1LBDqbo05+ +VNWl3w+cUGo3RLpn9kB8+/31DDusWxKu3Vtzr3X80QL3h+cYPJp65I/ISbna38nnNZub4p/ /fFh/ar+tQJrjbqtXbXkG4/eevRfiaU4I9FQi7moOBEAWlWHIuACAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1615 Lines: 42 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 Cc: Eduardo Valentin Signed-off-by: Chanwoo Choi --- drivers/thermal/samsung/exynos_tmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 933cd80..a60f527 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -682,6 +682,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) if (on) { con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); + con |= (1 << EXYNOS7_PD_DET_EN_SHIFT); interrupt_en = (of_thermal_is_trip_valid(tz, 7) << EXYNOS7_TMU_INTEN_RISE7_SHIFT) | @@ -704,9 +705,9 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) interrupt_en << EXYNOS_TMU_INTEN_FALL0_SHIFT; } else { con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); + con &= ~(1 << EXYNOS7_PD_DET_EN_SHIFT); interrupt_en = 0; /* Disable all interrupts */ } - con |= 1 << EXYNOS7_PD_DET_EN_SHIFT; writel(interrupt_en, data->base + EXYNOS7_TMU_REG_INTEN); writel(con, data->base + EXYNOS_TMU_REG_CONTROL); -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/