From patchwork Mon Feb 16 14:20:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 5833261 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B26E29F373 for ; Mon, 16 Feb 2015 14:21:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA7E220138 for ; Mon, 16 Feb 2015 14:21:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D03020154 for ; Mon, 16 Feb 2015 14:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755963AbbBPOU0 (ORCPT ); Mon, 16 Feb 2015 09:20:26 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:31750 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755562AbbBPOUV (ORCPT ); Mon, 16 Feb 2015 09:20:21 -0500 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NJV00LM1BTUC050@mailout4.samsung.com>; Mon, 16 Feb 2015 23:20:18 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.112]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 42.4B.17016.2ACF1E45; Mon, 16 Feb 2015 23:20:18 +0900 (KST) X-AuditID: cbfee68d-f79296d000004278-d3-54e1fca220e3 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 73.16.09430.2ACF1E45; Mon, 16 Feb 2015 23:20:18 +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 <0NJV00GH2BTU1D20@mmp2.samsung.com>; Mon, 16 Feb 2015 23:20:18 +0900 (KST) From: Chanwoo Choi To: rui.zhang@intel.com, edubezval@gmail.com Cc: kgene@kernel.org, b.zolnierkie@samsung.com, kyungmin.park@samsung.com, amit.daniel@samsung.com, l.majewski@samsung.com, a.kesavan@samsung.com, inki.dae@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 2/3] thermal: exynos: Fix wrong control of power down detection mode for Exynos7 Date: Mon, 16 Feb 2015 23:20:13 +0900 Message-id: <1424096414-4327-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.5.5 In-reply-to: <1424096414-4327-1-git-send-email-cw00.choi@samsung.com> References: <1424096414-4327-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42JZI2JSoLvoz8MQg+9b9C0er1nMZNFwNcRi 44z1rBbXvzxntZh/5RqrxaT7E1gs+h+/ZrY42/SG3eLNw82MFpseAyUu75rDZvG59wijxYzz +5gsnjzsY3Pg89g56y67x+I9L5k8Nq3qZPPYvKTeo2/LKkaPz5vkAtiiuGxSUnMyy1KL9O0S uDK6f7xhLvjPVbFoy2rWBsZZnF2MnBwSAiYSW7/OZ4OwxSQu3FsPZHNxCAksZZR4va6DBabo xdQprBCJ6YwSe1pOM0E4TUwSxy9fZQepYhPQktj/4gbYKBEBHYnDT54ygxQxC1xjkrh/5ARQ goNDWCBJ4v2HGJAaFgFVice3ljCB2LwCLhKXe6dBnaEgsWz5TFYQm1PAVeLt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XhTEiurUovy44tKc1KLDzGaAl01kVlK NDkfmC7ySuINjU3MjCyNzA0tjIzNlcR5lezbQoQE0hNLUrNTUwtSi2D6mDg4pRoY/VMYz7Uw a4Z02sWVhd/stZjLIabR+GjZFe9oTvGm06dvOu1MSopkvrpiA++xY/8kj1xf7JJ7gVl0kUil 9vs4s/zSOXHRYrPqZxguP7h8rcPsWVszPjMx9vTfnJKeJLeIqV0p9oJ93k6d+w3vNmWeuuuy 4Z1TJremYNrSk5tKbZiOa38QvGOsxFKckWioxVxUnAgA7Irn4d8CAAA= 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 --- 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 b8846f1..b199fff 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);