From patchwork Tue Apr 10 12:42:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10332991 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 E3CDF60365 for ; Tue, 10 Apr 2018 12:45:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D635628CDB for ; Tue, 10 Apr 2018 12:45:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C712B28CDA; Tue, 10 Apr 2018 12:45:40 +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 4E6BE28CDA for ; Tue, 10 Apr 2018 12:45:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753797AbeDJMon (ORCPT ); Tue, 10 Apr 2018 08:44:43 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:33073 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbeDJMok (ORCPT ); Tue, 10 Apr 2018 08:44:40 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180410124438epoutp01da6f6ff0e6b03f5e81b9e62b008b3955~kE72SCIvu2465424654epoutp01Z; Tue, 10 Apr 2018 12:44:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180410124438epoutp01da6f6ff0e6b03f5e81b9e62b008b3955~kE72SCIvu2465424654epoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523364278; bh=6lEpeGjg7TvlFHrDVeSEWuewGm06EVcJXmZfF2PohWQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=cGVWMO0wltlhXDLcJ3142a46SeQO2P3LDb+E3DEsiZYPw3uVIIuAFfViZta9Y+8XN mSaUBi2dt7lGgx6KlAD0cq1m34ItViLnFCcgc1YrWP1acbOOJlTiY9y2SNyASYF6RW d5aZjQA9AKx6S0X7ix7VsXFqMUJo98HieJsNWyy0= Received: from epsmges1p3.samsung.com (unknown [182.195.42.55]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20180410124437epcas1p39d7fdbd14cb8a03b9ffd862bba76d3a9~kE71X00TT0113401134epcas1p3k; Tue, 10 Apr 2018 12:44:37 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 20.BA.04070.5B1BCCA5; Tue, 10 Apr 2018 21:44:37 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20180410124436epcas1p3422f3653277634b8cc8bef223bc9298f~kE70O3JL10327603276epcas1p3e; Tue, 10 Apr 2018 12:44:36 +0000 (GMT) X-AuditID: b6c32a37-55dff70000000fe6-49-5accb1b5fb09 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 13.41.03849.4B1BCCA5; Tue, 10 Apr 2018 21:44:36 +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:36 +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 14/17] thermal: ti-soc-thermal: enable/check sensor after its setup is finished Date: Tue, 10 Apr 2018 14:42:08 +0200 Message-id: <1523364131-31059-15-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: H4sIAAAAAAAAAz2SaUhUURiGO3NXhyZuo+hJxWIgIsENs06lthB4Q3/0QxAsqkFvLrkMc1Wy slynMkcNidREK4100qaZ1DEXcmmc3AK1xNzKJVErzcQto3KW+vd+3/u8vHyHQ2Pi24Q9HRET x8ljpFESUojXtu11c6nRdAe7p2s8kSZfTaDpJQNAVUo9jkreDRCoOaUfoD8TXwjUqUsVoPTC RzgqmxqnUH99EYmWlK8BKpofptDUeDaJZqrtkLZ8kETr9cU4ahpbAke3s6kL7SRb+LGHZF8W jlJszZAXW9o4K2C1qlskOzLQSLLKtHmSza5WAVY3UIyxb+6t4qxhUCdgl7ROp0TBQu9QLioi gZO7+Z4XhpfqJjDZMn3p2xqVDMaoTGBFQ2Yf/PVkEmQCIS1m6gDsyU+zDKsATqbU/KfWy0YJ s9EAoOHrJwv1E8DarmbCSJHMIXjnhmrToGkbxh9WV9JGBmMKcPh9RI8ZGWtGCoc3Fk08zuyG 5UotbtQi5iRUZZQQ5jYn2NGeZ9JWm/uNpgVTM2TyKJg1sYGZoRPwWcVvS8AazhmqKWMxZBxg n97HzK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b5re/mojkjJz3YeHvc/8z9/78SRo58e4F3+PF0zc+uUqn7KF2PXswIKv D85Kf0tN+rp5mdWRl47fWc0sW5lPKf+xs2MwSpimyLJ3a+41oReTorqU/UWv317Ozfj2fC07 08OLopYLFySGSeicZlT8+8guXmudw8WpDUfuOyuxFGckGmoxFxUnAgCDojjodQIAAA== X-CMS-MailID: 20180410124436epcas1p3422f3653277634b8cc8bef223bc9298f X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180410124436epcas1p3422f3653277634b8cc8bef223bc9298f X-RootMTR: 20180410124436epcas1p3422f3653277634b8cc8bef223bc9298f 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 setting sensor data and check sensor after writing update interval. Cc: Eduardo Valentin Cc: Keerthy Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c index 3c2299b..a9afbf9 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c @@ -197,13 +197,15 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, return PTR_ERR(data->ti_thermal); } + ti_bandgap_set_sensor_data(bgp, id, data); + thermal_zone_device_toggle(data->ti_thermal, true); - thermal_zone_device_check(data->ti_thermal); - ti_bandgap_set_sensor_data(bgp, id, data); ti_bandgap_write_update_interval(bgp, data->sensor_id, data->ti_thermal->polling_delay); + thermal_zone_device_check(data->ti_thermal); + return 0; }