From patchwork Tue Apr 10 12:42:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10332989 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 A36036053B for ; Tue, 10 Apr 2018 12:45:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 953A227FAE for ; Tue, 10 Apr 2018 12:45:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86FD328CD8; Tue, 10 Apr 2018 12:45:34 +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=unavailable 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 128DE27FAE for ; Tue, 10 Apr 2018 12:45:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752759AbeDJMos (ORCPT ); Tue, 10 Apr 2018 08:44:48 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:23352 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753821AbeDJMop (ORCPT ); Tue, 10 Apr 2018 08:44:45 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180410124444epoutp02a167dfe5b9f019aa8e9e9e521940af27~kE77JbbEw0173301733epoutp02a; Tue, 10 Apr 2018 12:44:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180410124444epoutp02a167dfe5b9f019aa8e9e9e521940af27~kE77JbbEw0173301733epoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523364284; bh=vqDhmlOkMMuMY7c38S+yhslhcAoCeAxdeKkA0p9nZww=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=gxJtpLDW+YoHvp/0ucO+N+1MTPTnavT+fWdM5pz6iElCyNlaMm9oL6fzLAYomXHvA b4dZuD5VcG9AfgP+xa4t3rOGeGbu1ttBx4gQR5sJTjcgmgL1mfag8LyixhsjjRSq9l 4FWt2vcof+G2QJ+gD9sOeo8WcP4KvQkIqAr4fx0o= Received: from epsmges1p3.samsung.com (unknown [182.195.42.55]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180410124443epcas1p4c6be0f8ba407ebd05b89f15922359695~kE76rn5eM2646426464epcas1p4I; Tue, 10 Apr 2018 12:44:43 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 61.BA.04070.BB1BCCA5; Tue, 10 Apr 2018 21:44:43 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20180410124442epcas1p1b9d69f57eb25cc4dc69ebd7e85479036~kE76Ac-ux0049700497epcas1p1F; Tue, 10 Apr 2018 12:44:42 +0000 (GMT) X-AuditID: b6c32a37-575ff70000000fe6-50-5accb1bbdeb8 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 54.41.03849.AB1BCCA5; Tue, 10 Apr 2018 21:44:42 +0900 (KST) Received: from AMDC3058.DIGITAL.local ([106.120.53.102]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P6Y00EUVZATQUB0@mmp1.samsung.com>; Tue, 10 Apr 2018 21:44:42 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Zhang Rui , Eduardo Valentin Cc: Eric Anholt , Stefan Wahren , Markus Mayer , bcm-kernel-feedback-list@broadcom.com, Heiko Stuebner , Thierry Reding , Jonathan Hunter , Keerthy , Masahiro Yamada , Jun Nie , Baoyou Xie , Shawn Guo , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 15/17] thermal: uniphier: enable/check sensor after its setup is finished Date: Tue, 10 Apr 2018 14:42:09 +0200 Message-id: <1523364131-31059-16-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1523364131-31059-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSbUhTURjHPd6XXYer2xQ9KEgMgjLUxKJTmWUI3dQoSPpghY28qbWp7PqS QWFaltLUMEjnUrMw02SpK92caPNl+Rb4kkhpm6WlWSpNE60otzu//Z7z/M75Pw8cChPnEV5U QmIKq0iUyiSkEH/VsSPAr6W+P3pX7aoPqi/WEOiL1QRQnbILR+UjowRqvzEM0L9PcwTqbcpy RjdVlTh6MjUpQMN6NYmsyk6A1PMfBGhqMp9EM1pP1FA9RqJVfRmOWj9aweEtTNZCN8mozAMk o1NNCJiX7/cwjw2zzkxDTS7JjI8aSEaZPU8y+doawDSNlmHMmwcrOGMaa3JmrA0+J0XRwuBY VpaQxioCQs4L45/mdIPkBZcrA4/MIBM0UnnAhYL0bjjUvgjygJAS080AzpS2Y3yxAqC56q9g w1I9rHVYLQAuq38QfLEGYFG5HrNZJL0f3rtds25RlDsdAbXPKZuD0SU4XBzvsjtu9Bn4ObtY YHNwehuc7d1qQxF9DJZY5HyWD+zpLiJs7LJ+/Lt1wR4F6QIBHCyYdwwUBjMtVYBnN/jNpLU/ CWlvONR1kPezAfzV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unbpH/Rz/7nktjxc7PpL0mZFVtEqLSVnGdH1Py7vJJ0qF/h26Fzd1 f1fLwfUc+jmtLcL79RN+Fd/63NSxUXF5GWPolWlKxRpN96I1f82QDWiQX5jb6bhAu1nE4+XS hNiHzdP8r73jFTcN0/Y/fCdqrQyz3r/iw7OUWIozEg21mIuKEwE/0NNtdAIAAA== X-CMS-MailID: 20180410124442epcas1p1b9d69f57eb25cc4dc69ebd7e85479036 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180410124442epcas1p1b9d69f57eb25cc4dc69ebd7e85479036 X-RootMTR: 20180410124442epcas1p1b9d69f57eb25cc4dc69ebd7e85479036 References: <1523364131-31059-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 Enable sensor after checking trip points (unipher_tm_enable_sensor() enables IRQ so we need to toggle sensor before calling it) and check sensor after doing chipset specific enable sensor operation. Cc: Masahiro Yamada Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/uniphier_thermal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/uniphier_thermal.c b/drivers/thermal/uniphier_thermal.c index 8070747..cdecccd 100644 --- a/drivers/thermal/uniphier_thermal.c +++ b/drivers/thermal/uniphier_thermal.c @@ -307,9 +307,6 @@ static int uniphier_tm_probe(struct platform_device *pdev) return PTR_ERR(tdev->tz_dev); } - thermal_zone_device_toggle(tdev->tz_dev, true); - thermal_zone_device_check(tdev->tz_dev); - /* get trip points */ trips = of_thermal_get_trip_points(tdev->tz_dev); ntrips = of_thermal_get_ntrips(tdev->tz_dev); @@ -332,8 +329,12 @@ static int uniphier_tm_probe(struct platform_device *pdev) return -EINVAL; } + thermal_zone_device_toggle(tdev->tz_dev, true); + uniphier_tm_enable_sensor(tdev); + thermal_zone_device_check(tdev->tz_dev); + return 0; }