From patchwork Wed Oct 17 15:52:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10645789 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 C63BC13B0 for ; Wed, 17 Oct 2018 15:54:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5B592847D for ; Wed, 17 Oct 2018 15:54:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A984028614; Wed, 17 Oct 2018 15:54:12 +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 520302847D for ; Wed, 17 Oct 2018 15:54:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728062AbeJQXu3 (ORCPT ); Wed, 17 Oct 2018 19:50:29 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:18354 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeJQXu2 (ORCPT ); Wed, 17 Oct 2018 19:50:28 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20181017155406epoutp03538e316b4a990c068c5e462cf58fe10b~ecFgWozoZ1091710917epoutp03O; Wed, 17 Oct 2018 15:54:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20181017155406epoutp03538e316b4a990c068c5e462cf58fe10b~ecFgWozoZ1091710917epoutp03O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539791646; bh=iglxUMcPMhfUuAOYi+sNjf7vJUSJgka/85V7M93nyvo=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=EACGM29piTvSiEhaji4eos+8X4qK51JbT2mkk/T4h6aalTldLIuJnnC51nsckKNjO immpZDnPcgdyoCNXh1PB5FeRYyJKWk8YZKjTk78y3voLTZ6lrqZLi+IYWjHBISUcED S+PWwkAsuH0AkQtQ0mEJb/Egcjn/pZsTQxM9JLuA= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20181017155405epcas2p476aa1492bd61ab944ab4b6a3dd14c842~ecFfuBoPz2479824798epcas2p4r; Wed, 17 Oct 2018 15:54:05 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id EE.4F.04069.D1B57CB5; Thu, 18 Oct 2018 00:54:05 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20181017155403epcas2p1ed9777e96c6b2c77c2c5b67466be9843~ecFeBb2NA1266212662epcas2p1Y; Wed, 17 Oct 2018 15:54:03 +0000 (GMT) X-AuditID: b6c32a48-e59ff70000000fe5-05-5bc75b1dc546 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 44.44.03633.B1B57CB5; Thu, 18 Oct 2018 00:54:03 +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:54:03 +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 08/17] thermal: qcom: tsens: enable+check sensor after its setup is finished Date: Wed, 17 Oct 2018 17:52:34 +0200 Message-id: <1539791563-5959-9-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: H4sIAAAAAAAAAzVSfyyUcRzue/e+771uvXo74huLdeUPNkqjfadm2TTfJat/2lrXlot3KI7d i+IP49xE7aQwOT9HoZuSC4exyY87STZdM0tIocKU3WRYiXv573k+z/Ps83y2Dy2WaUk3Ok6V zKlVyng5JSXa+rwDfY8oLIqT602eKDuzVoSanzSRaN5mAeiFboBAVR/HSNSTZQVo6+siiYZM GhHS6msI9HR2RoKsneUUsun6ASpfnpCg2Zl8Cv1ocUXGhnEKrXdWEqh7ygbOybDml5nC+un3 FO7QT0pw66dAXNv1U4SNhjwKfx7rorAue5nC+S0GgE1jlWI8WLJGYMu4SYRtRo/LzDXp2Wgu Pi6VU58IjpTGvnkwIErapO6acivEmWCJvA8caMgGwA+Tq9tYSsvYdgBzXveKBbIG4JcyPbHn yl0pogThFYCLOVVAIBsATi48FO+4KDYIPrpn2BZo2pkNhy2N9M5YzA4Q8JvNe2fsxCrhYL3d TbBeUPOu0I4ZNgx2dzdIhF0e8K250N7OgcVwZKvavheyJRI4M7EIBFMobNP8EQnYCS5YWnbD 7nDe0Ax2AwAubTwjBNIEYOOweTdxBvZZRkmh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GpKs/N/4+Ldkl5i/xRETfOZdurn1tVtBoucpvVPH 76XOfl+f4rXucp53UFabJXf0vVLFvVM+cz48lLxOt+iPTMSHXy07eFOC2WqWxm7ZNOWJkde3 qRv3hot++vGx6dYlm3Vzptu3PW8JFfkvs0mVIzlCQ+awEktxRqKhFnNRcSIAY1i+L3wCAAA= X-CMS-MailID: 20181017155403epcas2p1ed9777e96c6b2c77c2c5b67466be9843 X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20181017155403epcas2p1ed9777e96c6b2c77c2c5b67466be9843 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 setting tmdev->sensor[i].tzd and calling chipset specific enable operation. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/qcom/tsens.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index dbd2556..01bff96 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -105,13 +105,13 @@ static int tsens_register(struct tsens_device *tmdev) if (IS_ERR(tzd)) continue; - thermal_zone_set_mode(tzd, THERMAL_DEVICE_ENABLED); - thermal_zone_device_check(tzd); - tmdev->sensor[i].tzd = tzd; if (tmdev->ops->enable) tmdev->ops->enable(tmdev, i); + + thermal_zone_set_mode(tzd, THERMAL_DEVICE_ENABLED); + thermal_zone_device_check(tzd); } return 0; }