From patchwork Wed Oct 17 15:52:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10645787 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A397C112B for ; Wed, 17 Oct 2018 15:54:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 938F0285D2 for ; Wed, 17 Oct 2018 15:54:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86D3428614; Wed, 17 Oct 2018 15:54:09 +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 27E5B285D2 for ; Wed, 17 Oct 2018 15:54:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728034AbeJQXuW (ORCPT ); Wed, 17 Oct 2018 19:50:22 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:18323 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeJQXuV (ORCPT ); Wed, 17 Oct 2018 19:50:21 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20181017155359epoutp03daca6f889c99df4b424a420a10afec6e~ecFaLBLjq1144411444epoutp03D; Wed, 17 Oct 2018 15:53:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20181017155359epoutp03daca6f889c99df4b424a420a10afec6e~ecFaLBLjq1144411444epoutp03D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539791639; bh=BjHWSgE6ioPfo1cNsI+0aulJ9sCAkQ2i4MrtRlzD37Y=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=VUBQ1a/1721XQrT7RIXAZN3NIebztTmd1G2xVL0ElZEK6JAygeUbsL4Ryd4McxAU1 oGBF+h6IwsGWTHbqDGZqu302nSAb5wu28q0s8Be+d+QWLi6V8u/z08+ppnxVIWMLLL IeApuchZQFu0qpuNMjM5F2WsIDNvxCcK6++etgeU= Received: from epsmges1p2.samsung.com (unknown [182.195.42.54]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20181017155358epcas1p2ed29860f0fc6594a3eee6c81bb039a9f~ecFZkgmVF2440224402epcas1p22; Wed, 17 Oct 2018 15:53:58 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id B5.4D.04078.61B57CB5; Thu, 18 Oct 2018 00:53:58 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20181017155357epcas1p3900b1d3522c636fdee27ab9928c076e1~ecFYR7OVr0486304863epcas1p3Z; Wed, 17 Oct 2018 15:53:57 +0000 (GMT) X-AuditID: b6c32a36-b25ff70000000fee-d6-5bc75b1637ef Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 38.A6.03743.51B57CB5; Thu, 18 Oct 2018 00:53:57 +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 <0PGR00KZM2SD3M00@mmp2.samsung.com>; Thu, 18 Oct 2018 00:53:57 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Zhang Rui , Eduardo Valentin Cc: Amit kucheria , 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 v2 07/17] thermal: hisi_thermal: enable+check sensor after its setup is finished Date: Wed, 17 Oct 2018 17:52:33 +0200 Message-id: <1539791563-5959-8-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1539791563-5959-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSXUiTYRTHe7b3a9bi5VXmk4LRwIspaUbmY37kReBrdlE3BQ6pmS8qTV2b H2lBS6OpNCm60OYnamVL03TmFCvxY0stzRyiqZU6zTT0YoofFdZ89e5/zvn9zzkcDiVkcnEP KikljVOnKJRSwgV73S3zPyqRW+XHLD+CUK62WoBeFTfgaN5hBahe34uhCtsojjrvjAC0PbOE o/7WHAG6a6jCUI19mkQj7aUEcuh7ACpdniCRfbqQQAsmd9RUO0agzfZyDL356gARDJuzYiFY w7ePBNtmmCLZli+BbHXHTwHbZMwn2MnRDoLV5y4TbKHJCNjW0XIh+75oHWOtY60C1tHkdV4c 4xIazymTMji1f/gVl0TDSx2patx/ozC3j9SCYVEBEFGQPgHLv7dgBcCFYmgzgPP6BpIP1gFc MlWBParY9o50aoZuBHB2nOGhLQALHIO4s0DQp+BDnfG/gaLc6GhoqqOcaSHdi8FZh8ypXek4 2DZiFjo1RnvDufISoRMX05GwYiWCH+UF+yyPdjqKaBYOblcSzlGQLiLhXE8twUNnYLP57a52 hYtWE+nsA2lP+Lk3bJcH8NfWE4wPGgC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GyYHsxnPqtt1xUnE/qBc5s63rJyfsuStly2ptbhgt+5gbcdE +6T9qkrrdz76Mm93Smvz9cuSbcbHhSYIu8U8fyHxWaQx0Evk6+RApuA18QI5l847b1tXe708 qmXeivz0TkWr75WGEzVW5BlY+W8108k4KvXvyOFI691KLMUZiYZazEXFiQCOnuUxewIAAA== X-CMS-MailID: 20181017155357epcas1p3900b1d3522c636fdee27ab9928c076e1 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20181017155357epcas1p3900b1d3522c636fdee27ab9928c076e1 References: <1539791563-5959-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 cc4e2ca..370696c 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_set_mode(sensor->tzd, THERMAL_DEVICE_ENABLED); - 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_set_mode((&data->sensor)->tzd, THERMAL_DEVICE_ENABLED); + 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_set_mode((&data->sensor)->tzd, THERMAL_DEVICE_ENABLED); - thermal_zone_device_check((&data->sensor)->tzd); - return 0; }