From patchwork Tue Apr 10 12:42:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10332987 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 86ECF6053F for ; Tue, 10 Apr 2018 12:45:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79BDF28B92 for ; Tue, 10 Apr 2018 12:45:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C2A328CD8; Tue, 10 Apr 2018 12:45:27 +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 E6A9328B92 for ; Tue, 10 Apr 2018 12:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752989AbeDJMo4 (ORCPT ); Tue, 10 Apr 2018 08:44:56 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:53243 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753821AbeDJMow (ORCPT ); Tue, 10 Apr 2018 08:44:52 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20180410124450epoutp0432e2d323c7139e2c092d1ae8d50a1c65~kE8BWqGNP0490804908epoutp04h; Tue, 10 Apr 2018 12:44:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20180410124450epoutp0432e2d323c7139e2c092d1ae8d50a1c65~kE8BWqGNP0490804908epoutp04h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523364290; bh=siBKakxaXbyVWSYn7a2ujlYHtPzvC1COiAXlyGrFceo=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=FqGl+yj4pC33TcfH/7BflYnf4XoOb6HHKFYEjur8nMt32s7C4iTLL87MPWiR/QEqH PhkFOVuYZaCTrk0R9B5eTh3wwFF4N5lqsVM6W35zDwydNBRLt4JFojwCGvV8K+7jnq T0W/VZ0FD847BQ/wklIFLQSka5UbkkxYRZR0jV2k= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180410124450epcas1p4d790426888fadb0f903e203b635f830e~kE8AxQrt92646426464epcas1p4O; Tue, 10 Apr 2018 12:44:50 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id E6.6F.04084.1C1BCCA5; Tue, 10 Apr 2018 21:44:50 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180410124449epcas1p2dd40472146b417f7cb2d2bfdaea232ba~kE8AD8vM70826808268epcas1p2C; Tue, 10 Apr 2018 12:44:49 +0000 (GMT) X-AuditID: b6c32a39-579ff70000000ff4-36-5accb1c179d7 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 95.41.03849.1C1BCCA5; Tue, 10 Apr 2018 21:44:49 +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:49 +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 16/17] thermal: zx2967: enable/check sensor after its setup is finished Date: Tue, 10 Apr 2018 14:42:10 +0200 Message-id: <1523364131-31059-17-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: H4sIAAAAAAAAAzWSSUxTQRjHnb6lj4bqo2xjCRyaECOGLZE4IBpNODwCBw8YFA3ayGOJLZA+ IMCJLaAsFYIGJaQIemAr2NJShBK1lCKLAhaxIGpQJKICJg2CGBdKy+038/9988+XDIWJqgkx lZGZwyoypTIJKcD7ho8GB5s0k0lhY9040tztIdCKfRQgdc0Ijppn5wj0tNgK0L+P3wg0bijh obLGVhw9XF7iI+tAE4nsNWaAmtbf8tHykpJEX3S+SNtmI9GvARWOht7bwRkPpmTDQjKNH16Q zOPGd3xGvxDBPDCu8hhtx02SWZwzkkxN6TrJKHUdgDHMqTDmecMWzozaDDzGrg04J0wSRKew sow8VhF6+qogfXmlmJetdstfHWzjFYFiqhK4UZA+Dm/1vMYqgYAS0f0Abj+qIJ2HLQA3b3eC fWtd3+oKBgFUmp+4RnYA/F42u2eRdBSsq+jYZYryouOgrotyOBh9D4c/Fkcwh+NJX4RWlRl3 ME4HwpY3xr1ZIR0LNdYZV1sAHLPUEw52273/PbRBOB6CdD0fVu00YE4pBrZb1C72hF9HdXxH MaT94KuRU06/FMCf/UaXUwugsUfk5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P2uguMeUZ9P5r9/q82H2COCdOW++65N/rx5t119+9K/lmw+B sgJdn6cbl6ayPDSV+st3YMqj+c0XDBiuqG9Q+a9yJeiFdHmPSFPOGo0riTNP2k+TVlHIapmy 3qamhX3m0n79HaxGEZfOF9+aN+/BxcfFx/YesVdiKc5INNRiLipOBABMq8C3dgIAAA== X-CMS-MailID: 20180410124449epcas1p2dd40472146b417f7cb2d2bfdaea232ba X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180410124449epcas1p2dd40472146b417f7cb2d2bfdaea232ba X-RootMTR: 20180410124449epcas1p2dd40472146b417f7cb2d2bfdaea232ba 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/check sensor after checking sensor coefficients. Cc: Jun Nie Cc: Baoyou Xie Cc: Shawn Guo Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/zx2967_thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/zx2967_thermal.c b/drivers/thermal/zx2967_thermal.c index ffd2b07..45ed17f 100644 --- a/drivers/thermal/zx2967_thermal.c +++ b/drivers/thermal/zx2967_thermal.c @@ -168,9 +168,6 @@ static int zx2967_thermal_probe(struct platform_device *pdev) goto disable_clk_all; } - thermal_zone_device_toggle(priv->tzd, true); - thermal_zone_device_check(priv->tzd); - if (priv->tzd->tzp->slope == 0) { thermal_zone_of_sensor_unregister(&pdev->dev, priv->tzd); dev_err(&pdev->dev, "coefficients of sensor is invalid\n"); @@ -178,6 +175,9 @@ static int zx2967_thermal_probe(struct platform_device *pdev) goto disable_clk_all; } + thermal_zone_device_toggle(priv->tzd, true); + thermal_zone_device_check(priv->tzd); + priv->dev = &pdev->dev; platform_set_drvdata(pdev, priv);