Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp826809imm; Wed, 17 Oct 2018 08:55:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Nx/zGHF+fv2gjxx/M4TVs0spRCdUzDezy6WXeNxPHrZRSRliZwzsP3uswEyBaFZGp86bl X-Received: by 2002:a62:9605:: with SMTP id c5-v6mr27014076pfe.26.1539791703778; Wed, 17 Oct 2018 08:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539791703; cv=none; d=google.com; s=arc-20160816; b=KX5J2wpYIQeoFP+d3miE1StDTo5XO+B69gpE8OJDVpC9/fkzA/zahXSG0UiyBhjCj7 OyKJXn1pW3otMoGMi2sRx/RDdaMoMhkkAXKwX/iolU0pt07VNzFJAFdpTiXVMAUDnYYP gh3dqOnUUUR8Z17l9F8im9efU1hIn59s1eRY0nUPugeJ/XjCg/DoCLlGeUKF3y/eEBa2 zoyJAsVz0SMKTQSrQps9X+B6es7DWQmcNR4eswNAA65MP7gnfbplm3wUxEowEN2b4yhr /vSoWkZWnEcaRc4c/+islff7NdTvQdMymfUE87JMTyjzAECN55nyWAETAsjTPQaVeUFw El6A== 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=BjHWSgE6ioPfo1cNsI+0aulJ9sCAkQ2i4MrtRlzD37Y=; b=TpH0Ry7gJgnJ49fknWd8uzHX/iX3tCMt5PVJv1tBMkboR7k5nd2JfrOtserBvu25Vl eb9kFV0AFCgfyfEDh2DaCm5kxb5Us8rz8yT7mEaJ7ovj6MZX3F7dFeUzNbcPILLqkujW xkIkJUVw70xNQfvUxM7r6dThSVWbH9yVrRv0WozU9ZSW2bYW5CWo9UtpHc17NMzDf5// csv6J8+4LXK+6r4rk4XLbHb3gp64x+3QJ1atb4ANELe1rsD2xj3xW8xgn3AALtpMUYwh fw/ZcmB4KiuQXamaq318Y/4hPKjdhaIwEFxehAs3i6Ed2J+Bep6+zOcjA5VBjHrO3IHE pmyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="VUBQ1a/1"; 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 g128-v6si17149691pfc.284.2018.10.17.08.54.48; Wed, 17 Oct 2018 08:55: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="VUBQ1a/1"; 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 S1728046AbeJQXuW (ORCPT + 99 others); Wed, 17 Oct 2018 19:50:22 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:18323 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeJQXuV (ORCPT ); Wed, 17 Oct 2018 19:50:21 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20181017155359epoutp03daca6f889c99df4b424a420a10afec6e~ecFaLBLjq1144411444epoutp03D; Wed, 17 Oct 2018 15:53:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20181017155359epoutp03daca6f889c99df4b424a420a10afec6e~ecFaLBLjq1144411444epoutp03D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539791639; bh=BjHWSgE6ioPfo1cNsI+0aulJ9sCAkQ2i4MrtRlzD37Y=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=VUBQ1a/1721XQrT7RIXAZN3NIebztTmd1G2xVL0ElZEK6JAygeUbsL4Ryd4McxAU1 oGBF+h6IwsGWTHbqDGZqu302nSAb5wu28q0s8Be+d+QWLi6V8u/z08+ppnxVIWMLLL IeApuchZQFu0qpuNMjM5F2WsIDNvxCcK6++etgeU= Received: from epsmges1p2.samsung.com (unknown [182.195.42.54]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20181017155358epcas1p2ed29860f0fc6594a3eee6c81bb039a9f~ecFZkgmVF2440224402epcas1p22; Wed, 17 Oct 2018 15:53:58 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id B5.4D.04078.61B57CB5; Thu, 18 Oct 2018 00:53:58 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20181017155357epcas1p3900b1d3522c636fdee27ab9928c076e1~ecFYR7OVr0486304863epcas1p3Z; Wed, 17 Oct 2018 15:53:57 +0000 (GMT) X-AuditID: b6c32a36-b25ff70000000fee-d6-5bc75b1637ef Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 38.A6.03743.51B57CB5; Thu, 18 Oct 2018 00:53:57 +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:53:57 +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 07/17] thermal: hisi_thermal: enable+check sensor after its setup is finished Date: Wed, 17 Oct 2018 17:52:33 +0200 Message-id: <1539791563-5959-8-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: H4sIAAAAAAAAAzWSXUiTYRTHe7b3a9bi5VXmk4LRwIspaUbmY37kReBrdlE3BQ6pmS8qTV2b H2lBS6OpNCm60OYnamVL03TmFCvxY0stzRyiqZU6zTT0YoofFdZ89e5/zvn9zzkcDiVkcnEP KikljVOnKJRSwgV73S3zPyqRW+XHLD+CUK62WoBeFTfgaN5hBahe34uhCtsojjrvjAC0PbOE o/7WHAG6a6jCUI19mkQj7aUEcuh7ACpdniCRfbqQQAsmd9RUO0agzfZyDL356gARDJuzYiFY w7ePBNtmmCLZli+BbHXHTwHbZMwn2MnRDoLV5y4TbKHJCNjW0XIh+75oHWOtY60C1tHkdV4c 4xIazymTMji1f/gVl0TDSx2patx/ozC3j9SCYVEBEFGQPgHLv7dgBcCFYmgzgPP6BpIP1gFc MlWBParY9o50aoZuBHB2nOGhLQALHIO4s0DQp+BDnfG/gaLc6GhoqqOcaSHdi8FZh8ypXek4 2DZiFjo1RnvDufISoRMX05GwYiWCH+UF+yyPdjqKaBYOblcSzlGQLiLhXE8twUNnYLP57a52 hYtWE+nsA2lP+Lk3bJcH8NfWE4wPGgCs+2AR8IYQ2G0dxvnlDsLltfs4bxbDvHsMj7DQWriw e4gSAPWmp+ABOFQJ9hmBhFNpkhM4TYDquJ9GkaxJT0nwu5qa3AR2XsPnpBlUDZ7rAj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e708 qmXeivz0TkWr75WGEzVW5BlY+W8108k4KvXvyOFI691KLMUZiYZazEXFiQCOnuUxewIAAA== X-CMS-MailID: 20181017155357epcas1p3900b1d3522c636fdee27ab9928c076e1 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20181017155357epcas1p3900b1d3522c636fdee27ab9928c076e1 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+check sensor after checking ntrips and doing chipset specific enable operation. * Remove superfluous second sensor enable+check attempt. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/hisi_thermal.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index cc4e2ca..370696c 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -488,9 +488,6 @@ static int hisi_thermal_register_sensor(struct platform_device *pdev, return ret; } - thermal_zone_set_mode(sensor->tzd, THERMAL_DEVICE_ENABLED); - thermal_zone_device_check(sensor->tzd); - trip = of_thermal_get_trip_points(sensor->tzd); for (i = 0; i < of_thermal_get_ntrips(sensor->tzd); i++) { @@ -553,6 +550,9 @@ static int hisi_thermal_probe(struct platform_device *pdev) return ret; } + thermal_zone_set_mode((&data->sensor)->tzd, THERMAL_DEVICE_ENABLED); + thermal_zone_device_check((&data->sensor)->tzd); + if (data->irq) { ret = devm_request_threaded_irq(dev, data->irq, NULL, hisi_thermal_alarm_irq_thread, @@ -563,9 +563,6 @@ static int hisi_thermal_probe(struct platform_device *pdev) } } - thermal_zone_set_mode((&data->sensor)->tzd, THERMAL_DEVICE_ENABLED); - thermal_zone_device_check((&data->sensor)->tzd); - return 0; } -- 1.9.1