From patchwork Tue Apr 10 12:42:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10332971 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 EAB986053B for ; Tue, 10 Apr 2018 12:44:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB25028B92 for ; Tue, 10 Apr 2018 12:44:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF4EA28CD8; Tue, 10 Apr 2018 12:44:25 +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 46BD428B92 for ; Tue, 10 Apr 2018 12:44:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753723AbeDJMoY (ORCPT ); Tue, 10 Apr 2018 08:44:24 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:32993 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753711AbeDJMoT (ORCPT ); Tue, 10 Apr 2018 08:44:19 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180410124417epoutp01223659360e6fde0b8423f98a77ee6ac9~kE7ipp6dh2507725077epoutp019; Tue, 10 Apr 2018 12:44:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180410124417epoutp01223659360e6fde0b8423f98a77ee6ac9~kE7ipp6dh2507725077epoutp019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523364257; bh=DMg4hlr/81YNPBu+3X7vvENdLm9OT4k6bTtlYlFMHaM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=maLDSKWAt2X3XOYdrqDjFVRjMewbCb4Gam2TVE0Nm/M3H2zJlwy/slfXA6Z4VYEAM JyF/Ld81JKWkkR/CndFP1kbSV4bN/pUMxPd1pPeXBzgWBpXXFgh25LagWw6OrhYPyW 2/3dgiPlztTHgf43Hm5YPymrdNT+jaiTK44QOhGA= Received: from epsmges1p3.samsung.com (unknown [182.195.42.55]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180410124417epcas1p413fea6306f868ba2873f782cae807dbb~kE7iLweiU2646426464epcas1p49; Tue, 10 Apr 2018 12:44:17 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 8D.AA.04070.1A1BCCA5; Tue, 10 Apr 2018 21:44:17 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180410124416epcas1p284cf4e47c0231f764ed81efcee7c0e14~kE7hmaVqp2191021910epcas1p26; Tue, 10 Apr 2018 12:44:16 +0000 (GMT) X-AuditID: b6c32a37-575ff70000000fe6-2e-5accb1a15599 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id EE.31.03849.0A1BCCA5; Tue, 10 Apr 2018 21:44:16 +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:16 +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 12/17] thermal: exynos: enable/check sensor after its setup is finished Date: Tue, 10 Apr 2018 14:42:06 +0200 Message-id: <1523364131-31059-13-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: H4sIAAAAAAAAAzWSe0hTYRjG+7Zzzo6zyXFafihYDSQU8kJKX1pSUHBKif7MBebIg5e8rB2v QWIqmsvNG5E685J2cSXeZi5T8ZLaxRIviMx5Sw1Tm5KZaKS5Hfvved/n9z4vL7wkX6zEHcmI mDhGESOLkhBC7HWPq+eJyoYBqefUthA1FNXh6Nt6P0C1ql4MlY+O4ajz3ghAu1+XcfSxJY2H MkqeYKh6flaARlpLCbSuegdQqWlCgOZn1QRa1DmgxhfjBNpqLcNQ+9Q6OGdLp632EXTJ9GeC flMyKaCbDT50Vdt3Ht2ozSZo41gbQavSTQSt1mkB3TJWxqffP9rE6P7xFh693uh8VSQVngll oiISGIWHf4gwXJ3WAeR/rZLquwt4qaCJVAKShJQ37MiGSmBFiik9gJVlkUog3NObADY1N+Fm w8wM6jWAM94CWFU4J+CKbQD19VPATBGUL8zP0gJzqj0VAHWvSDPDp4oxuGbs5ZsZOyoIqjXV llSMcoEFnY8tsyLqEiz6qSW4bc7wQ1+hhbHa6/9pX8XNQZDKFcDi1hUBB12AK8+e8DhtB5f6 dQLuHCc43HuW49MB/K1v43NMHoB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Fx 0uy1DJE9E26LrLI5bzqT9VyPxkvl218/vY1fG26fd6XsyJLVupH5VyWTLNTFjlm2zYx8rzzp 07pnjnvizW3qil0V7qr9X/PI8/nu6/lHs96Z8Ov2eMh85NbijfqwP1HKQPT2/awyc71LN6Vz 1JftL2nhqBSNzZth+WaidW+IucrFjzzpUWlKLMUZiYZazEXFiQCPPSyAdgIAAA== X-CMS-MailID: 20180410124416epcas1p284cf4e47c0231f764ed81efcee7c0e14 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180410124416epcas1p284cf4e47c0231f764ed81efcee7c0e14 X-RootMTR: 20180410124416epcas1p284cf4e47c0231f764ed81efcee7c0e14 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 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 af1902d..68457f5 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1403,15 +1403,14 @@ static int exynos_tmu_probe(struct platform_device *pdev) goto err_sclk; } - thermal_zone_device_toggle(data->tzd, true); - 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_device_toggle(data->tzd, true); + ret = devm_request_irq(&pdev->dev, data->irq, exynos_tmu_irq, IRQF_TRIGGER_RISING | IRQF_SHARED, dev_name(&pdev->dev), data); if (ret) { @@ -1420,6 +1419,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: