From patchwork Thu Nov 13 15:01:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 5298451 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B38E49F2F1 for ; Thu, 13 Nov 2014 15:11:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E008420211 for ; Thu, 13 Nov 2014 15:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2FC620212 for ; Thu, 13 Nov 2014 15:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754010AbaKMPEH (ORCPT ); Thu, 13 Nov 2014 10:04:07 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:50376 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752931AbaKMPEE (ORCPT ); Thu, 13 Nov 2014 10:04:04 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEZ00G9BGIR5840@mailout1.samsung.com>; Fri, 14 Nov 2014 00:04:03 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-85-5464c8632f4b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id EE.70.09430.368C4645; Fri, 14 Nov 2014 00:04:03 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NEZ00J8WGELNZ00@mmp2.samsung.com>; Fri, 14 Nov 2014 00:04:03 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Eduardo Valentin Cc: Zhang Rui , Amit Daniel Kachhap , Lukasz Majewski , Kyungmin Park , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH v2 13/33] thermal: exynos: replace threshold_falling check by Exynos SoC type one Date: Thu, 13 Nov 2014 16:01:08 +0100 Message-id: <1415890888-8881-14-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1415890888-8881-1-git-send-email-b.zolnierkie@samsung.com> References: <1415890888-8881-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBLMWRmVeSWpSXmKPExsVy+t9jQd3kEykhBr+3cVs0XA2x2DhjPavF /CvXWC3ONr1ht3jzcDOjxeVdc9gsPvceYbSYcX4fk8WTh31sDpweO2fdZfdYvOclk0ffllWM Hp83yQWwRHHZpKTmZJalFunbJXBl3JjQwFawgLviy+52tgbG/ZxdjBwcEgImErP/V3UxcgKZ YhIX7q1n62Lk4hASmM4o8WvffxYIp4tJ4uWS7ywgVWwCVhIT21cxgtgiAloSJy5tZwIpYhZY xiRx6dt8JpCEsECyxKtpL8FsFgFViWlX/zKD2LwCHhIzDv5khlinKNH9bAIbiM0JFH819S/Y UCEBd4lrj94xT2DkXcDIsIpRNLUguaA4KT3XSK84Mbe4NC9dLzk/dxMjOLyeSe9gXNVgcYhR gINRiYf3BUtKiBBrYllxZe4hRgkOZiURXu/DQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8B1ut A4UE0hNLUrNTUwtSi2CyTBycUg2MycZL4nw503OrU+sVXteHz/jxd5ul02OPoihP7ZXT72XL MzQFrHcvl5nUsWGV59WP8f57Lyy4UJq/S0Ex6PL053cPZ4dXb9jjd3TOr9j61TteszjvXtc+ Z2ejp2ZEz/1jvy+7lq53lHnN8Wtu2mVm53uvRF51PtmyO/HWpj6Ne4Ibg98HKK3VV2Ipzkg0 1GIuKk4EAFjeLUUrAgAA Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Replace pdata->threshold_falling check for non-zero value in exynos_tmu_initialize() by an explicit check for a SoC type (all SoC types except Exynos5440 have pdata->threshold_falling assigned to non-zero value in their struct exynos_tmu_registers instances). This is a preparation for introducing per-SoC type tmu_initialize method. There should be no functional changes caused by this patch. Cc: Amit Daniel Kachhap Cc: Lukasz Majewski Cc: Eduardo Valentin Cc: Zhang Rui Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park --- drivers/thermal/samsung/exynos_tmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 1c15b37..4f7cad9 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -231,7 +231,7 @@ static int exynos_tmu_initialize(struct platform_device *pdev) pdata->trigger_levels[i]); rising_threshold &= ~(0xff << 8 * i); rising_threshold |= threshold_code << 8 * i; - if (pdata->threshold_falling) { + if (data->soc != SOC_ARCH_EXYNOS5440) { threshold_code = temp_to_code(data, pdata->trigger_levels[i] - pdata->threshold_falling);