Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756022AbbBPOU2 (ORCPT ); Mon, 16 Feb 2015 09:20:28 -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 X-AuditID: cbfee68d-f79296d000004278-d3-54e1fca220e3 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 goNDWCBJ4v2HGJAaFgFVice3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g1GJh/eDysMQIdbEsuLK3EOMEhzMSiK8y94DhXhTEiurUovy44tKc1KLDzGaAl01kVlK NDkfmC7ySuINjU3MjCyNzA0tjIzNlcR5lezbQoQE0hNLUrNTUwtSi2D6mDg4pRoY/VMYz7Uw a4Z02sWVhd/stZjLIabR+GjZFe9oTvGm06dvOu1MSopkvrpiA++xY/8kj1xf7JJ7gVl0kUil 9vs4s/zSOXHRYrPqZxguP7h8rcPsWVszPjMx9vTfnJKeJLeIqV0p9oJ93k6d+w3vNmWeuuuy 4Z1TJremYNrSk5tKbZiOa38QvGOsxFKckWioxVxUnAgA7Irn4d8CAAA= 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 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); -- 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/