Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp827889imm; Wed, 17 Oct 2018 08:56:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV637k25qUlDS//Xm57RCr4ghzDXuBsHOVBgGQYc/6MIE0WP3yG0oljKZTn2lE1aBeeQA9/xn X-Received: by 2002:a17:902:8bc3:: with SMTP id r3-v6mr26153640plo.218.1539791763122; Wed, 17 Oct 2018 08:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539791763; cv=none; d=google.com; s=arc-20160816; b=zEt6bxsnScLtkN+Q4s+OWjr2A/NZqvUkqLVdjsPdm7GbCP5xH1wzLedy2dtU6UKFv8 FlQNJA+63vTri8LBCU5svn1XBBtAJjnbJirzbYhQswq5kd3zCzf/BGdENiSpCuW+58I8 isC+6ZPLMfpI9Wl8u8hgeklySQoKE/2DFChdo7wegUzV2BA74RReBIAP3eCMmlz1eq32 v7c5wB8l/CN5qZIBt/M7+s2uBJzltLGIfdM5PProdSrN1ZfrV2oyE0LltE+azeDLUx6H c0CXUSiffSrOAuu3Em50VqrJo4v05NYqRpP0gA96idhDLk2DbpJoBtmyMv36/P7mivfM MZuQ== 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=dhe+bkWFIacRqoxR5vBYCjnNquU4LvLJTXdac2+zIdQ=; b=RfsgiCZoH+9niRCS1pxfqe3+zoXwTJnGmm5tOMI7A9cJxCUmpevLyUP2BPbie2Gz80 qpDOmzwKeaA8sezTTxIlyb0ZYqUG3C7zWAby8R8toLvC8ab09h+IW/oyQUjASwjsZJgU qxueRGnSoitzVWN2TkIhdi5qtAKz5q+Eff22toczRSBH+8OGjSvXVDQS8gugap9t/jFR NDzX4H1SyqBt/B0RjmKFKlIMUz4d8koMcw/i2nH7SLoDM9EWGUeyObZwq4SuKThiOxGy +VPXWbkFcOFX7jhSOTNEKRiXsQJg5WLfhAVHrcdga3Kgqu/aMTbWptB4pO86Mb0I5NAD ZWPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZbkHzNOc; 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 a15-v6si16821046pfn.248.2018.10.17.08.55.47; Wed, 17 Oct 2018 08:56:03 -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=ZbkHzNOc; 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 S1728156AbeJQXvK (ORCPT + 99 others); Wed, 17 Oct 2018 19:51:10 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:12977 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeJQXvK (ORCPT ); Wed, 17 Oct 2018 19:51:10 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20181017155448epoutp04eb40f9fed910036d58e937c00b28fdca~ecGH1aG5w0269102691epoutp04j; Wed, 17 Oct 2018 15:54:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20181017155448epoutp04eb40f9fed910036d58e937c00b28fdca~ecGH1aG5w0269102691epoutp04j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539791688; bh=dhe+bkWFIacRqoxR5vBYCjnNquU4LvLJTXdac2+zIdQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ZbkHzNOci8wOT4Vblgk+0BLoZDE95nhic9OUsosUe6Lg7c+jehnA/I2t09Unjl2tT vDOeqC/t4a5tAa6qnf/f/8u0YO8IKUlnAw/2F3iXplfl4u7Ia7I/F8HNgsOeTCipDD XaNRsGUkBoNAbozltA+jV/NzlYorqLE8IZ95gKBk= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20181017155447epcas2p3cf3d552600e8c4879fbc4cebf1b738c8~ecGHIS7qO2404124041epcas2p32; Wed, 17 Oct 2018 15:54:47 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id B5.EF.04077.74B57CB5; Thu, 18 Oct 2018 00:54:47 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20181017155447epcas2p2db761f6575de357b65eb5e39b709fead~ecGGfdRXC1848918489epcas2p22; Wed, 17 Oct 2018 15:54:47 +0000 (GMT) X-AuditID: b6c32a46-475ff70000000fed-05-5bc75b475139 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 89.44.03633.64B57CB5; Thu, 18 Oct 2018 00:54:47 +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:46 +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 15/17] thermal: uniphier: enable+check sensor after its setup is finished Date: Wed, 17 Oct 2018 17:52:41 +0200 Message-id: <1539791563-5959-16-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: H4sIAAAAAAAAAzWSe0hTYRjG+7azc46jyWGKfjkSWhgpaaldPl1X0jzQhaAIdKGNPKjkVDYn 6j95CVNho8jyfsFL2DKcY+myCeJl89IkXZlWJposK1vhKM1Max7973nf9/fwvC+8JFdYwPMh k1LSGUWKLFmM87H2Xv8jgVFSi/SAaTgY5ec0cFBbWSsP2Z0WgJ6o+zFU+2qch7pzbQCtz37l oaGOPA66VVGPoca5GQLZOqtw5FT3AVTleEeguRkNjuYN3kjfPIGj3501GOr64AQnhXTedzNO V0xbcfpZxRRBP317iG4wfebQem0RTr8fN+G0Ot+B0xqDFtAd4zVceqB0CaMtEx0c2qn3vSiI 4R+NZ5KTMhjF/uPX+InLZh2WVsTPtGpsRA6wksXAjYTUQdjeo+MWAz4ppIwAaqrLCbZYAnDt tYO7RQ2VVWwOdACamhyblhUAG/PHMBeFU+Hw7m0tKAYk6UmdhYaWjQgu1Y/Bj05/l/agYuH8 SAnPpTHKD06UfNqwCigazht+ADbMFw6a720wbv/7I+t1uCsLUqUEVHetEiwUAe3GnxirPeAX i2GzL4J2bRvYNAC4sNKEsUUrgC0vzByWksBeyyiPXc8dFvb+JVxbQ0oACwuELELDl/UdOHtl JYDlkzXcO2BHHdimBV5MmlKewChD0kKClDK5UpWSEHQ9Va4HG98RcMYIGkfO9QCKBOLtAqOX WSrkyTKUWfI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u/d+m9e3y2mZ4X3lJ+KFhy2TgyZdL3o0f7cSS3FGoqEWc1FxIgBejN1oewIAAA== X-CMS-MailID: 20181017155447epcas2p2db761f6575de357b65eb5e39b709fead X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20181017155447epcas2p2db761f6575de357b65eb5e39b709fead 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 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 ed3a920..9ccc1fc 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_set_mode(tdev->tz_dev, THERMAL_DEVICE_ENABLED); - 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_set_mode(tdev->tz_dev, THERMAL_DEVICE_ENABLED); + uniphier_tm_enable_sensor(tdev); + thermal_zone_device_check(tdev->tz_dev); + return 0; } -- 1.9.1