Received: by 10.213.65.68 with SMTP id h4csp3853729imn; Tue, 10 Apr 2018 05:48:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+EnEqHXZsvfD8ek+Brs9nW3OcXXqgM0osDKDiH9HNL+NCd9BquESWN5gQ9alSwJgvfb927 X-Received: by 10.98.194.26 with SMTP id l26mr235668pfg.47.1523364528510; Tue, 10 Apr 2018 05:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523364528; cv=none; d=google.com; s=arc-20160816; b=g4wMxcK7n9jlhHitVliJ/P7BfNnZNb48LFwJikf47pACwTKlzDi3KVAy+RWU7mU/PA fRexUZpuaXfrC4oWqF2EAAni8TNWcUouACvliZdE0BgSAtOT66cWqM5dHY86pk25Z42G HOY5USV4Cm9I5k/Ctz/VOnIc8I3Yg6T7dIGQoR8wPk4a007nVvTX1u+BMZXbfUeX4L6m 6YzOxV1YxsIPy+BsAvuxTVNnOjz+0F1K/K5LHMPrXNHiyB0PjITFZyqDB3EbfnVGxf8J 8Wo/OztvHuGHohoMLGz4b5UBJzFOT9+ItDH8PT/TAJiosGODZsOpj2+/CXwZToYLZjJX Ei3A== 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=vqDhmlOkMMuMY7c38S+yhslhcAoCeAxdeKkA0p9nZww=; b=UI+LYhNEMvdfsUmYD48xW/h3E8/1ahWKk0looetox0OMPyiaHINZeS6gG5R/gmCkbP Qc+JBYLnZfM9aecQ2GEMOKTGvFWwNtySw2O3+gpE7HXtXGsP/IYn932zhR5AABJisk6u gGTnYDRtRd8PuRhbdwqIOOHrawn4xDSuO5SN66ctBHLFyFED8hd6uroGZzR1CTHNA9zy NhBZzcDmqw7f/hcUTzzuxiJGL38mt8XjxjUS0eEhrc0SVoP62+IeieVa9mfYV4FTf5m6 Yg5jfSEmnanet0Y6eYIrbCB9ZEv9IUa5Yuu6l8G5NLGJyF63IUv8EAwPmaA6dAiIDMDY Qslg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=gxJtpLDW; 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 d13si2091045pfl.206.2018.04.10.05.48.11; Tue, 10 Apr 2018 05:48:48 -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=gxJtpLDW; 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 S1753835AbeDJMot (ORCPT + 99 others); Tue, 10 Apr 2018 08:44:49 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:23352 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753821AbeDJMop (ORCPT ); Tue, 10 Apr 2018 08:44:45 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180410124444epoutp02a167dfe5b9f019aa8e9e9e521940af27~kE77JbbEw0173301733epoutp02a; Tue, 10 Apr 2018 12:44:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180410124444epoutp02a167dfe5b9f019aa8e9e9e521940af27~kE77JbbEw0173301733epoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523364284; bh=vqDhmlOkMMuMY7c38S+yhslhcAoCeAxdeKkA0p9nZww=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=gxJtpLDW+YoHvp/0ucO+N+1MTPTnavT+fWdM5pz6iElCyNlaMm9oL6fzLAYomXHvA b4dZuD5VcG9AfgP+xa4t3rOGeGbu1ttBx4gQR5sJTjcgmgL1mfag8LyixhsjjRSq9l 4FWt2vcof+G2QJ+gD9sOeo8WcP4KvQkIqAr4fx0o= Received: from epsmges1p3.samsung.com (unknown [182.195.42.55]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180410124443epcas1p4c6be0f8ba407ebd05b89f15922359695~kE76rn5eM2646426464epcas1p4I; Tue, 10 Apr 2018 12:44:43 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 61.BA.04070.BB1BCCA5; Tue, 10 Apr 2018 21:44:43 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20180410124442epcas1p1b9d69f57eb25cc4dc69ebd7e85479036~kE76Ac-ux0049700497epcas1p1F; Tue, 10 Apr 2018 12:44:42 +0000 (GMT) X-AuditID: b6c32a37-575ff70000000fe6-50-5accb1bbdeb8 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 54.41.03849.AB1BCCA5; Tue, 10 Apr 2018 21:44:42 +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:42 +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 15/17] thermal: uniphier: enable/check sensor after its setup is finished Date: Tue, 10 Apr 2018 14:42:09 +0200 Message-id: <1523364131-31059-16-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: H4sIAAAAAAAAAzWSbUhTURjHPd6XXYer2xQ9KEgMgjLUxKJTmWUI3dQoSPpghY28qbWp7PqS QWFaltLUMEjnUrMw02SpK92caPNl+Rb4kkhpm6WlWSpNE60otzu//Z7z/M75Pw8cChPnEV5U QmIKq0iUyiSkEH/VsSPAr6W+P3pX7aoPqi/WEOiL1QRQnbILR+UjowRqvzEM0L9PcwTqbcpy RjdVlTh6MjUpQMN6NYmsyk6A1PMfBGhqMp9EM1pP1FA9RqJVfRmOWj9aweEtTNZCN8mozAMk o1NNCJiX7/cwjw2zzkxDTS7JjI8aSEaZPU8y+doawDSNlmHMmwcrOGMaa3JmrA0+J0XRwuBY VpaQxioCQs4L45/mdIPkBZcrA4/MIBM0UnnAhYL0bjjUvgjygJAS080AzpS2Y3yxAqC56q9g w1I9rHVYLQAuq38QfLEGYFG5HrNZJL0f3rtds25RlDsdAbXPKZuD0SU4XBzvsjtu9Bn4ObtY YHNwehuc7d1qQxF9DJZY5HyWD+zpLiJs7LJ+/Lt1wR4F6QIBHCyYdwwUBjMtVYBnN/jNpLU/ CWlvONR1kPezAfzVbMB4pxBAg0bM8wHYYRq0B2D0Jji/fJfg74rgnRyHwkBL0TOc51A4W1Lt 2F0NoM6oxwqBVwVwqgEebDInj2O5wOQgf04q51IT4/wvJMkbgP2H+O5tBi/eRhoBTQGJq6jw dV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zdP8r73jFTcN0/Y/fCdqrQyz3r/iw7OUWIozEg21mIuKEwE/0NNtdAIAAA== X-CMS-MailID: 20180410124442epcas1p1b9d69f57eb25cc4dc69ebd7e85479036 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180410124442epcas1p1b9d69f57eb25cc4dc69ebd7e85479036 X-RootMTR: 20180410124442epcas1p1b9d69f57eb25cc4dc69ebd7e85479036 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 checking trip points (unipher_tm_enable_sensor() enables IRQ so we need to toggle sensor before calling it) and check sensor after doing chipset specific enable sensor operation. Cc: Masahiro Yamada Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/uniphier_thermal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/uniphier_thermal.c b/drivers/thermal/uniphier_thermal.c index 8070747..cdecccd 100644 --- a/drivers/thermal/uniphier_thermal.c +++ b/drivers/thermal/uniphier_thermal.c @@ -307,9 +307,6 @@ static int uniphier_tm_probe(struct platform_device *pdev) return PTR_ERR(tdev->tz_dev); } - thermal_zone_device_toggle(tdev->tz_dev, true); - thermal_zone_device_check(tdev->tz_dev); - /* get trip points */ trips = of_thermal_get_trip_points(tdev->tz_dev); ntrips = of_thermal_get_ntrips(tdev->tz_dev); @@ -332,8 +329,12 @@ static int uniphier_tm_probe(struct platform_device *pdev) return -EINVAL; } + thermal_zone_device_toggle(tdev->tz_dev, true); + uniphier_tm_enable_sensor(tdev); + thermal_zone_device_check(tdev->tz_dev); + return 0; } -- 1.9.1