From patchwork Tue Apr 10 12:42:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10333001 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 87D7C6053B for ; Tue, 10 Apr 2018 12:46:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7976027FAE for ; Tue, 10 Apr 2018 12:46:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E68F28826; Tue, 10 Apr 2018 12:46:18 +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 D2F6D27FAE for ; Tue, 10 Apr 2018 12:46:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752940AbeDJMnp (ORCPT ); Tue, 10 Apr 2018 08:43:45 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:57481 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753106AbeDJMnm (ORCPT ); Tue, 10 Apr 2018 08:43:42 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20180410124340epoutp0316a982fba9afa283c051781574f99cb1~kE6-9KQrE0503205032epoutp03_; Tue, 10 Apr 2018 12:43:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20180410124340epoutp0316a982fba9afa283c051781574f99cb1~kE6-9KQrE0503205032epoutp03_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523364220; bh=eb7iON/etM+4IppXiOzX2qKp/+KfLwGF/wbpANlsmKM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ByD/uwyAfqIIxKE1tdNnV+tHfTIasY0s+9TRNErcVZM/Sre48UerHcYtLl6rKIsYN NN6OsDyCoH/75Jvvim4PWLF9sK0BatA+gOD5BGBPGjYMoFw4nR7qvN2kEc6fZ8bHbH VEzMw+gsgc+lGWH/mBarqwUwLoyyZMWhEdjraceM= Received: from epsmges2p1.samsung.com (unknown [182.195.42.69]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20180410124340epcas2p1d862df9611339c359aaa1ba37b381ba0~kE6-mGvSU2862828628epcas2p1R; Tue, 10 Apr 2018 12:43:40 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 50.F1.04068.C71BCCA5; Tue, 10 Apr 2018 21:43:40 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20180410124339epcas2p31bdbdc3d5fc602b3c7fe60b02e8faacd~kE6-IFw2_0880708807epcas2p3x; Tue, 10 Apr 2018 12:43:39 +0000 (GMT) X-AuditID: b6c32a45-6ebff70000000fe4-bc-5accb17c8053 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 69.2E.03827.B71BCCA5; Tue, 10 Apr 2018 21:43:39 +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:43:39 +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 07/17] thermal: hisi_thermal: enable/check sensor after its setup is finished Date: Tue, 10 Apr 2018 14:42:01 +0200 Message-id: <1523364131-31059-8-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: H4sIAAAAAAAAAzWSe0hTURzHO9u9Z3fm4jYlDxr+seoPjSxD46ChlUY3VFBChEHYyotam65N TaPAR5SvmT21tSw0UYcPtOlMJzjN9yPEuImZZYqYb1pmVlLNzf8+h9/nfL+/A4fiizWkKxWf kMSqEmRyCXQgmjo9fA/dqB+UHtnUQ1xfXEfiWUsPwDWaLgI/f8eRuD1jFOC/XxZI3G/M5OFb 2lICv5yZEuDRFh3EFs0bgHXLHwR4ZqoA4jmDC26oHIN4o6WEwG2TFnBiN5O50g0Z7achyLzW fhQwjeO+TJnpK49p0OdAZoIzQUaTtQyZAoMeMEauhM/0Fq0TTM+YkcdYGtzDRVKH4zGsPD6F VR0OuOAQ93h6ASpzdqZyFRaQDvTCXCCkEO2DLL1FRC5woMR0M0CGZ/l822EdoPyah/xtq/xt lt1qBWi8PNdu/QKofMkMrRak/dC9O3qQCyjKmQ5BhmrK6vDpJwRanejaSnKio9EQN01YmaAP oPWVvC0W0QzSbAzb29xRX/cD0spC+iz63bZCWoMQfVeAvk2ZoE0KRnX9esLGTmi+xyCwsRua 1dcD24UsgH40m+yphQCZ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ZXZdVC76tv63Bcsv3atDeB1pHrNqWzP9st/PRFGYG9RAD3WsZ pnVzd9nOvnV4Vu7/hZ03dj+fM71+gzvX4aVhmleeLzi+ytBrna/JZw3vvIUs0+IW3jp9JaE5 +VZueabQtkKBBw9ubNwraSUYN8tVdtvkogazx0osxRmJhlrMRcWJAL8Boj91AgAA X-CMS-MailID: 20180410124339epcas2p31bdbdc3d5fc602b3c7fe60b02e8faacd X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180410124339epcas2p31bdbdc3d5fc602b3c7fe60b02e8faacd X-RootMTR: 20180410124339epcas2p31bdbdc3d5fc602b3c7fe60b02e8faacd 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 ntrips and doing chipset specific enable operation. * Remove superfluous second sensor enable/check attempt. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/hisi_thermal.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 1936eb4..d4c5055 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -488,9 +488,6 @@ static int hisi_thermal_register_sensor(struct platform_device *pdev, return ret; } - thermal_zone_device_toggle(sensor->tzd, true); - thermal_zone_device_check(sensor->tzd); - trip = of_thermal_get_trip_points(sensor->tzd); for (i = 0; i < of_thermal_get_ntrips(sensor->tzd); i++) { @@ -553,6 +550,9 @@ static int hisi_thermal_probe(struct platform_device *pdev) return ret; } + thermal_zone_device_toggle((&data->sensor)->tzd, true); + thermal_zone_device_check((&data->sensor)->tzd); + if (data->irq) { ret = devm_request_threaded_irq(dev, data->irq, NULL, hisi_thermal_alarm_irq_thread, @@ -563,9 +563,6 @@ static int hisi_thermal_probe(struct platform_device *pdev) } } - thermal_zone_device_toggle((&data->sensor)->tzd, true); - thermal_zone_device_check((&data->sensor)->tzd); - return 0; }