Received: by 10.213.65.68 with SMTP id h4csp3857378imn; Tue, 10 Apr 2018 05:51:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/+maiIY9M/SM3AmwvovOoGAxE8Wg5SMc1F303EFCovGDo+BNXZqxUhefOQTMfu3mbrE5S0 X-Received: by 10.99.45.2 with SMTP id t2mr212762pgt.356.1523364715972; Tue, 10 Apr 2018 05:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523364715; cv=none; d=google.com; s=arc-20160816; b=W+JPmDrrMbBWsSUNKVYFBHgnecl/klloeXG/BoLovuToPzwatOv0L/3cba62QndX32 HPN02S/dDKNDKYb0KaDEzxjFrfuHf9Rjy1ejJykP+b/15ST59Z+iOXlaxughwvvQeMl5 tpXQ0yVLxUWuqIXH5tpe7HRy1AkVZOtpOYswltMTChyj5d+19b51aRSMqjWym4QLfS4a vj3hNqfkT+VPo2/ABzBtE/FWOZ6ekyT29vCXzcfkH729Dw2iy5r7fxA1X2lMcFTAeVc7 glv4u2pBlybD7U1Bdvk/E41hRj3ue3vBn/Hdfg2G2K4ENX46SSqD1sw0Qpznoeh+rr6W +APQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=6lEpeGjg7TvlFHrDVeSEWuewGm06EVcJXmZfF2PohWQ=; b=DyNDsgqLJXCooXp54/+aR1aYyrk963z+etq1/dqbI9rPJI3YhmgXwa1pM6ZBXyte5S EtOn1GSNZdP44y4tv6MinMfjMH4Txp1G6P17xkSK4YPZt0jq3LzEVQHti3oIHYmZQJcA PxAbjuD7Fbcc+tDPn2dPa34btNeofPIR8k9afCto45ZnHPRBLj1O1bMggRhgri6L5rBx lu+BcJin6kmFFXy9SFkstJ0psihm3UVo3eJN0XTy6jOpMX+7aW4o9ZzkNKAYDR59ug2K KdaCrHPQLBNeMl3Uv0rBZNd5t5JCc/a/Pxqne/6LW85HBtUX7xHoe4fk3/X2Hek4+zS4 eEEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=cGVWMO0w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3-v6si2305429plp.682.2018.04.10.05.51.19; Tue, 10 Apr 2018 05:51:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=cGVWMO0w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753813AbeDJMoo (ORCPT + 99 others); Tue, 10 Apr 2018 08:44:44 -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 n97HzKcBuFLXaOFzAWxUi836MGwz9JqyGLMNzi9nEeasCN5UWBAWlr/oI836GGwZMb6X8eAi ANV3FVQusH8AtqiALSfjo8M43kPm6cpLo/n4mDDXkNhoLTB9EecDdeD524BWwNBAslWU29IV LCakCXx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lT8+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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 1.9.1