From patchwork Thu Apr 26 11:51:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10365759 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2E75A601BE for ; Thu, 26 Apr 2018 11:52:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F61A287B1 for ; Thu, 26 Apr 2018 11:52:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1405528E33; Thu, 26 Apr 2018 11:52:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81BB0287B1 for ; Thu, 26 Apr 2018 11:52:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756155AbeDZLwu (ORCPT ); Thu, 26 Apr 2018 07:52:50 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:48431 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756042AbeDZLwe (ORCPT ); Thu, 26 Apr 2018 07:52:34 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180426115232epoutp01da72deb78e87411abf1424ed25ff66f3~o_i61zsXP0232602326epoutp01e; Thu, 26 Apr 2018 11:52:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180426115232epoutp01da72deb78e87411abf1424ed25ff66f3~o_i61zsXP0232602326epoutp01e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524743552; bh=E71kfNPg29dPfmq/568Epu+dfDLFhSqNtKzWU5zVQbA=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=BBMh1HGOI1Q5lzU6WhreMHVhS92zQpL9sNyesLLhl41IQMzzkf0bMaa2jF4U+zmYF SdIQIk3R/SKlQ/WQq/CWAlDyG48qRrKNpJX5Sq/ZLt8i/sN9MD+PCh/Xan92ATxQIn kAf+EeaNVlYY6cpohApfHBYaqVYQ+18N2gfqPX4M= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20180426115232epcas2p2d460b6de88993f55b46737d64a983e34~o_i6iVrYq0690506905epcas2p2-; Thu, 26 Apr 2018 11:52:32 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 3B.94.04132.F7DB1EA5; Thu, 26 Apr 2018 20:52:31 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20180426115231epcas2p3727de5409903e05811c2b5ed10ee0a51~o_i6OyQpL0036100361epcas2p3-; Thu, 26 Apr 2018 11:52:31 +0000 (GMT) X-AuditID: b6c32a46-145ff70000001024-d0-5ae1bd7f3608 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 90.3B.03817.F7DB1EA5; Thu, 26 Apr 2018 20:52:31 +0900 (KST) Received: from AMDC3058.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P7S00GD7JMBQG00@mmp2.samsung.com>; Thu, 26 Apr 2018 20:52:31 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Eduardo Valentin Cc: Zhang Rui , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 13/18] thermal: exynos: set trips in ascending order in exynos7_tmu_initialize() Date: Thu, 26 Apr 2018 13:51:28 +0200 Message-id: <1524743493-28113-14-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1524743493-28113-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJIsWRmVeSWpSXmKPExsWy7bCmuW793odRBjf2WllsnLGe1WL+lWus Fpd3zWGz+Nx7hNFixvl9TBZPHvaxObB57Jx1l91j8Z6XTB59W1YxenzeJBfAEsVlk5Kak1mW WqRvl8CVsWTFPZaCXo6KY1vfMjcwfmDrYuTgkBAwkTjcXdvFyMUhJLCDUeLV17lMEM53Ron+ V6vYuxg5wYoOnt3ABpHYwCgx8fViRgjnF6PExdVvmUCq2ASsJCa2r2IEsUUEtCROXNoONopZ YA6jxKyG3SwgCWGBJImNzzexgdgsAqoS0za9Zwe5g1fAU+LtITuIbXISJ49NZgWxOYHCF440 sYDMkRBoZJNourEQ6iQXibPPHrFA2MISr45vgYpLSzxbtZERoqGZUeLbjj3MEIkJjBJ71gtB 2NYSh49fBNvALMAn0XH4LzskMHglOtqEIEwPibsfAyGqHSVWvHzBAvEw0C+Xju9mn8AotYCR YRWjWGpBcW56arFRgZFecWJucWleul5yfu4mRnAEarntYFxyzucQowAHoxIPb8DCB1FCrIll xZW5hxglOJiVRHjjWx9GCfGmJFZWpRblxxeV5qQWH2KU5mBREudt8D0TJSSQnliSmp2aWpBa BJNl4uCUamAskGo7fvKXpuuM698d9r15+X3VasWTwTIRr1jP9ybWd66QCrqwoC5d8l3RrK/n Y/kDF/Jy7+xaeO9Cdc3s87rhAf8O/ejQDn+YXb+p+KFf6IHmlcI5Pz/UJnnYvb3vkWi7JO16 3/afGid/CcZ85VgunN1yL8eg+HK4i+n5SybtrC35UZMbtDKVWIozEg21mIuKEwF8DSsxvAIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e+xoG793odRBt+2q1lsnLGe1WL+lWus Fpd3zWGz+Nx7hNFixvl9TBZPHvaxObB57Jx1l91j8Z6XTB59W1YxenzeJBfAEsVlk5Kak1mW WqRvl8CVsWTFPZaCXo6KY1vfMjcwfmDrYuTkkBAwkTh4dgOQzcUhJLCOUeLM535mCOcXo8S7 C9/ZQarYBKwkJravYgSxRQS0JE5c2s4EUsQsMIdR4vmKOUwgCWGBJImNzzeBjWURUJWYtuk9 UDMHB6+Ap8TbQ3YQ2+QkTh6bzApicwKFLxxpYgGxhQQ8JO73vWebwMizgJFhFaNkakFxbnpu sVGBUV5quV5xYm5xaV66XnJ+7iZGYMhsO6zVv4Px8ZL4Q4wCHIxKPLwBCx9ECbEmlhVX5h5i lOBgVhLhjW99GCXEm5JYWZValB9fVJqTWnyIUZqDRUmclz//WKSQQHpiSWp2ampBahFMlomD U6qBccOlwxev2utsYFIq/2e40vXH/DvrN11ifjltf/PSSMtws0nOEU7zNK6v+frIZUc50ye9 ctvi5ymz7NTuru16dC08Pv69qMZ5o2nX47K/f6nSadnyw2Kfzp4l0ouOnjuk0F7wO/Bb25p1 D3zfLtgdMWmiM1NKj+8iEV9DwZ6mMh8epjPBlw6asSqxFGckGmoxFxUnAgBWWxpAFQIAAA== X-CMS-MailID: 20180426115231epcas2p3727de5409903e05811c2b5ed10ee0a51 X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180426115231epcas2p3727de5409903e05811c2b5ed10ee0a51 X-RootMTR: 20180426115231epcas2p3727de5409903e05811c2b5ed10ee0a51 References: <1524743493-28113-1-git-send-email-b.zolnierkie@samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Set trips in ascending order in exynos7_tmu_initialize() (it should make no difference in driver operation). This prepares the driver code to moving trips setting from ->tmu_initialize method to exynos_tmu_initialize(). Signed-off-by: Bartlomiej Zolnierkiewicz --- 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 12b60e2..571511f 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -618,7 +618,7 @@ static void exynos7_tmu_initialize(struct platform_device *pdev) sanitize_temp_error(data, trim_info); /* Write temperature code for rising and falling threshold */ - for (i = (of_thermal_get_ntrips(tz) - 1); i >= 0; i--) { + for (i = 0; i < of_thermal_get_ntrips(tz); i++) { tz->ops->get_trip_temp(tz, i, &temp); temp /= MCELSIUS; exynos7_tmu_set_trip_temp(data, i, temp);