From patchwork Tue Feb 24 04:56:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 5869861 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F2813BF440 for ; Tue, 24 Feb 2015 04:57:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 27FE220648 for ; Tue, 24 Feb 2015 04:57:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6B5E20644 for ; Tue, 24 Feb 2015 04:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbbBXE5H (ORCPT ); Mon, 23 Feb 2015 23:57:07 -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 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NK9003QVF312Q60@mailout3.samsung.com>; Tue, 24 Feb 2015 13:57:02 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 1C.F9.18484.D940CE45; Tue, 24 Feb 2015 13:57:01 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-0a-54ec049d850c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 3D.6F.09430.D940CE45; Tue, 24 Feb 2015 13:57:01 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NK900FYLF31P180@mmp2.samsung.com>; Tue, 24 Feb 2015 13:57:01 +0900 (KST) 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/nAIbJSyQJNGwcxYjiM0ioCpxftY0sGZeAVeJ92s7GSHWKUgsWz6TFcTmFHCT6L91B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aYkVlalFuXHF5XmpBYfYjQFumois5Ro cj4wYeSVxBsam5gZWRqZG1oYGZsrifMq2beFCAmkJ5akZqemFqQWwfQxcXBKNTAWummYLNyt 4vL6T2N2dGDjkhmd80WEl0bw2D27meaXo3V2HZPTrNfrQooPLj1kWfri8m6J5Z1LBDqbo05+ +VNWl3w+cUGo3RLpn9kB8+/31DDusWxKu3Vtzr3X80QL3h+cYPJp65I/ISbna38nnNZub4p/ /fFh/ar+tQJrjbqtXbXkG4/eevRfiaU4I9FQi7moOBEAWlWHIuACAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Abhilash Kesavan --- 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);