Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp827805imm; Wed, 17 Oct 2018 08:55:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV62lYZjsFJyQe/XZVWfCxcB835iy44xlZDs9vF+dwmCXRypo3L5LCt5ftSI10BnNYejJHbI9 X-Received: by 2002:a17:902:8687:: with SMTP id g7-v6mr27012399plo.30.1539791758945; Wed, 17 Oct 2018 08:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539791758; cv=none; d=google.com; s=arc-20160816; b=vp9NY4hyD3+1VO1NCXCbkcdiBsmeZ9jecFajJ8tv0SmY1xv43RHNZJ6RnnIjg2euD9 zLUdZihptj+feLGi7A0rBzLg7p+xQN32GGIPCAjhX4DZyHQe3fjgubIB5GNDqYZxIlx+ +vwsjdy0L4pJnbmF8JPb5JPRs+IemGiaOm3DwU5luUOlc5H7K/knJL1bVNbkCqEl+3sP K2lrpQtIkA8dTWJ/b87Ze5jb4ILxx8OFguX3mN5LuoOjNBsqdYSryISsQ35VYq7PwYTG poFYjjctw4xfLV70Is9XhrV6GD6ss7yBYoPWOVCbBM9i5aNZZiucHHVP19SB8vwDfJy3 Hi+A== 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; bh=UQ4eoVxr3LPXmaXuV9z+qSoklL/ynuV49Be7ea1NhGI=; b=m4jLc04OTr6lvHAc6z5MPiwqN6AYFMSFW2gu0eHHzpFKjk1NsRBcnDWKGdDCkyjPVO tSrS8IlTK+V7aJ+6teaNyLAZZ0OaegUalsfiAw/yeuFE/mAhNvUnuu5CshrI0xgEMYae Heu4fCOGQV+4SHaPD9DX34ilFl4rUBD4mIoKoh9kLI5bOZmVf1SxdhjO0zrum0DuACI4 ixBqiMRPX5KdKLX4DWpB8Og8j7wAejlwinruchtWqStrnkJBfo1WmPSsLelJEGYkmvcS Af/qpxBYpWro6BA/zl0lQqTcNhaeWFFw0DhjfGjfOSOB/C28JGKTzLHl9vshBXiSbEHP /UUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=vNFxEm+5; 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 w18-v6si18490733pfg.70.2018.10.17.08.55.43; Wed, 17 Oct 2018 08:55:58 -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=vNFxEm+5; 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 S1728142AbeJQXvF (ORCPT + 99 others); Wed, 17 Oct 2018 19:51:05 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:12955 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeJQXvF (ORCPT ); Wed, 17 Oct 2018 19:51:05 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20181017155443epoutp04ef1cfc5380017884c5cef126d93ec9c5~ecGC4zUxo0668806688epoutp049; Wed, 17 Oct 2018 15:54:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20181017155443epoutp04ef1cfc5380017884c5cef126d93ec9c5~ecGC4zUxo0668806688epoutp049 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539791683; bh=UQ4eoVxr3LPXmaXuV9z+qSoklL/ynuV49Be7ea1NhGI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=vNFxEm+5DWzkcfuGqbrkKs12cAGbcOZYZMkbxLkXC5O9cZyB8RRpbV93WzdxHDbcz 9TpaEDOJ7l9E8G4EbjzbwTL12R8oioR4Vx6HD1ri+yHcCqCjKBn1wTsR8mYLsEMXTx Zi3kUYY3TJkD7LS3m+1A/JsVOwBCw04bTU33g5bM= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20181017155442epcas1p246b2e004b4aad1bff572db8c4ccdd750~ecGCEKuJB1629016290epcas1p2C; Wed, 17 Oct 2018 15:54:42 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 54.D9.04081.24B57CB5; Thu, 18 Oct 2018 00:54:42 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20181017155440epcas1p12c33048a8c1c083496d1a8996591d884~ecGAs9xoa1224012240epcas1p1k; Wed, 17 Oct 2018 15:54:40 +0000 (GMT) X-AuditID: b6c32a39-689ff70000000ff1-77-5bc75b4222b3 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 4C.A6.03743.04B57CB5; Thu, 18 Oct 2018 00:54:40 +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:40 +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 14/17] thermal: ti-soc-thermal: enable+check sensor after its setup is finished Date: Wed, 17 Oct 2018 17:52:40 +0200 Message-id: <1539791563-5959-15-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: H4sIAAAAAAAAAzWSbUhTURjHO7t3d9fh5DZNjwpGoyAFNS3zZGUhFRcqivpQNMpG3lTyrXtV 0rLWlExNsaQsXdOysJZlDd8SBV/mrqZJqYg1y3xBKsdCV82UNOe1b7//8/ye85wDh8TkmWIv MjYhmWETVHEKQorXtfsG+kcoeeWmEYs7ylRXiNCru9ViNGnjAXqe34GjsoFBMWq52g/Q4tiU GL2p14hQVslDHD2aGJWg/kYtgWz5RoC0VrMETYwWEOhrjQcyPBki0J9GHY6aP9vAbjmt+WEi 6JKRtwT9uuSThK79GEJXNH0T0QZ9DkEPDzYRdH6mlaALavSArh/UYXRnsR2n+aF6EW0z+ByW nZDuiGLiYlMZNjD8tDRmobIIS9I4XbC844EaTElyAUlCagusNDC5QErKqQYAa28/EAvBDmCX 2bwUnJYla36PSGi8BPBnwQwmhDkA7bOluMMiqDB4M1sPHMe6UfthTRXpKGNUBw7Hbb4OdqWi 4GzfNHAwTm2ARWVqiYNlFA1vP5tYWeYDu0xFy+y0VO9dLCccuyBVLIGNc9oVaQ9s7ZomBHaF 3/maled4w76OnSs+gJa5x7gQqgGs6jGJhIHtsJ1/LxZu5wKtv26IhWEZvH5NLig0LO58gTlY TpUCqPstKwSe5WCVHrgzSVx8NMMFJYUEcKp4LiUhOuBMYrwBLH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XfDJ+VRMk2HaTGV7ldlvb7Jt mzS9stSPXW3Vbk+JnptC6paiUpufp2v4uAYESO/vabdRYinOSDTUYi4qTgQAq9U703wCAAA= X-CMS-MailID: 20181017155440epcas1p12c33048a8c1c083496d1a8996591d884 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20181017155440epcas1p12c33048a8c1c083496d1a8996591d884 References: <1539791563-5959-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 aa15719..4675d96 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_set_mode(data->ti_thermal, THERMAL_DEVICE_ENABLED); - 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