From patchwork Wed Oct 17 15:52:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10645799 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 5C2B513B0 for ; Wed, 17 Oct 2018 15:54:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B76227861 for ; Wed, 17 Oct 2018 15:54:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F7EC283E7; Wed, 17 Oct 2018 15:54:46 +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 E225C27861 for ; Wed, 17 Oct 2018 15:54:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727304AbeJQXux (ORCPT ); Wed, 17 Oct 2018 19:50:53 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:63400 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeJQXuw (ORCPT ); Wed, 17 Oct 2018 19:50:52 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20181017155430epoutp018e84d6d39ec6a3c6e95cc037bc3b043b~ecF29lpfw3012130121epoutp01D; Wed, 17 Oct 2018 15:54:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20181017155430epoutp018e84d6d39ec6a3c6e95cc037bc3b043b~ecF29lpfw3012130121epoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539791670; bh=U1IhVFsSqW2TG06k3HCt9gp0mnPHXvzkI3ko6pz8vZs=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=MZIdGFi5liua3bG5uUyQVdUMynBrvfKJvDRLzTbruoAy6XVNquCV0pigXbbAxBRdN ls9TBK5xMIysjiZqwoAVIh2RmVrmTXZ/gUAnCJsO3Ho/+RJPqr5WwGvZUFQ0dK/s2n +ecKWn/XCk9G4IS39YOwyKISLOEXOOfkpir3eTPo= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20181017155429epcas2p4248d231b6e5ebae6c9df0f02b411546a~ecF18wDyQ0750407504epcas2p4V; Wed, 17 Oct 2018 15:54:29 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id D3.5F.04069.53B57CB5; Thu, 18 Oct 2018 00:54:29 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20181017155428epcas2p1aca0b5e7b30b89db7be7026dfa740fc6~ecF1IC3ZR2791227912epcas2p1Q; Wed, 17 Oct 2018 15:54:28 +0000 (GMT) X-AuditID: b6c32a48-e59ff70000000fe5-21-5bc75b35ce67 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id F7.44.03633.43B57CB5; Thu, 18 Oct 2018 00:54:28 +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:28 +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 12/17] thermal: exynos: enable+check sensor after its setup is finished Date: Wed, 17 Oct 2018 17:52:38 +0200 Message-id: <1539791563-5959-13-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: H4sIAAAAAAAAAzWSa0hTYRjHfbezs7PZ5DBN3zSsFhIKWYnG25UgPxyywE9dXGWHdpiSm7Iz Jf1QpuUNp+WMeVmz1EyGlxzLTbPwumXkogyz0tVKzC5YtEDSwtyOfvv/n+f/8HseeAi+tEgQ TqSrtYxGTWfIcDHWPRS9e3uC3Cnf+du2HhXmN/FQV02nAM16nQC160Yw1PBqQoD6r4wDtPzx mwA9tRXw0NW6Rgw1z3iEaLzXiCOvbhgg4/w7IZrxVOBozhqGLK2TOPrTa8LQI7cXHJJSBT8c OFX3fgyneuqmhdSDtwlUU98XHmUxl+LU1EQfTukK53GqwmoGlG3CxKeeGBYwyjlp41FeS2Sy JEW8X8FkpOcwmh0Hz4nTBjp6+Fk14ot6nR3LBy6iDIgISMbD6govvwyICSlpB3DIWQ84swCg y9gtWEt9vuPBucZ9AMvdvRhnFgEs7O/AfSmc3AtvFJtXxgkihEyC1jY/gk+OYPCTN9qng8nT cE7fjfk0RkbBxp8DQp+WkBRcbO3jcbBIOOrQ+8Gilbpr+bYfDEmTEA7rDUIulAgnizpWdTD8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qRmp6YWpBbB ZJk4OKUaGE1/twZwfon7nu5neGT65ZmCt+5OsNq8XMol8nuFlGBO3F6jImm7yXrKU9prf044 waZ96Nj5M9qHd7733XorNfEJx8+iy1vctpidZp+57AtL0EUB+7q2HQsX16yRktv26dX5ZS7l F6XrPDklEnrW96QG5K6cL3CIv2J5yd84DSldI6Ub+js3rVRiKc5INNRiLipOBADFkLNLewIA AA== X-CMS-MailID: 20181017155428epcas2p1aca0b5e7b30b89db7be7026dfa740fc6 X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20181017155428epcas2p1aca0b5e7b30b89db7be7026dfa740fc6 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 sensor after doing chipset specific initialization operation and check sensor after doing chipset specific control operation. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/samsung/exynos_tmu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 8ec74a62..796a868 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1109,15 +1109,14 @@ static int exynos_tmu_probe(struct platform_device *pdev) goto err_sclk; } - thermal_zone_set_mode(data->tzd, THERMAL_DEVICE_ENABLED); - thermal_zone_device_check(data->tzd); - ret = exynos_tmu_initialize(pdev); if (ret) { dev_err(&pdev->dev, "Failed to initialize TMU\n"); goto err_thermal; } + thermal_zone_set_mode(data->tzd, THERMAL_DEVICE_ENABLED); + ret = devm_request_irq(&pdev->dev, data->irq, exynos_tmu_irq, IRQF_TRIGGER_RISING | IRQF_SHARED, dev_name(&pdev->dev), data); if (ret) { @@ -1126,6 +1125,9 @@ static int exynos_tmu_probe(struct platform_device *pdev) } exynos_tmu_control(pdev, true); + + thermal_zone_device_check(data->tzd); + return 0; err_thermal: