Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp827363imm; Wed, 17 Oct 2018 08:55:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV62tLqdn4cZcTRQ7fysw7xQqcmq5PS89Njh0cY1X55JFXiGAULgwEmMx1TmzM8zl2yCawL24 X-Received: by 2002:a63:4c23:: with SMTP id z35-v6mr25265672pga.312.1539791733627; Wed, 17 Oct 2018 08:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539791733; cv=none; d=google.com; s=arc-20160816; b=KnOVX9dwKh/OXpSJQyUnNr03Ryr1zQdXoIc/P5GzdVZ/UHu/F+fzhOoiivWk7Y44SN vLnGu8qIw2TX19dwiAyQ9JDUJEIS9XbPVPrBwaKlAaKRHaTbEc27rroLzZi3c7QT6CK3 UCFziQhsDCNpZXdYw9IB2XgefpH0u42LH1Wl6bwsXwGq0a3B+J/ypq/p9S7mFf9L6JlL ZfQv7s3ce1rc3ZhpS0lFc32NF8XOkYhz8IRFhNl9Nat0WlFhKc8arU7MFA3FNdN/rUnj 7Pq6Z6P2EZA+TKW88SMiNsMsDZC41Or6Y0xEOyJyXoxGKRlbxHEhp3G9T5rz4cddZdMm 4usw== 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=EVdvRRzAO2L/q6VAysCXdYzmLoTBThv6IQRdbpQDC8g=; b=lenaEyJbT/8CuqEEaxKZLYCdccC3qQYbORXB4MPVJe/rA1w6otFVF3zGEyWv1sDqix Xs9KVJkdnNGttopdlnl+V7Us0PilDH6l4C6PzmNm03vAJc2gNyasHGNHlWaLbG8oWFEj s+YRaiKjEA2gWd/mzhllvZ8Fo+UFOXKqwCcS+qEWptEwDpD7qrvACsWNeCVG3/lEEfAN SlC1Kn98e8mJMLW2i8XvDDH/L81CvdaCFrkJ4VuLfZHbHnQ3JC7MGUNHdpkOTSm9bXdw C/vvAnoXMd7tF/YMI/8Ey7hD/uhqTPY1l3cRPUrYxDzcTSmI4TVsat1bAcqeQxOBypfJ KxfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="e/WnkwCG"; 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 136-v6si19343597pfw.278.2018.10.17.08.55.18; Wed, 17 Oct 2018 08:55:33 -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="e/WnkwCG"; 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 S1728099AbeJQXur (ORCPT + 99 others); Wed, 17 Oct 2018 19:50:47 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:18416 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeJQXuq (ORCPT ); Wed, 17 Oct 2018 19:50:46 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20181017155424epoutp036af53c68a83d83721de404c5f7b6c4a9~ecFxqA1Er1091710917epoutp03S; Wed, 17 Oct 2018 15:54:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20181017155424epoutp036af53c68a83d83721de404c5f7b6c4a9~ecFxqA1Er1091710917epoutp03S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539791664; bh=EVdvRRzAO2L/q6VAysCXdYzmLoTBThv6IQRdbpQDC8g=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=e/WnkwCGr1aaqxvtyTfysIwhUEulEeKGOkacVp6xh/fGu2Ed7PyQchMyLXNNw8+rj sqNgfcWB89po3KSMjW68lRYqLZ9bNltfvJJawOG2F33xMfhtAQpoMcS6kHg65S5R0+ NauurvQaXJpLKLOqGzX4mfbAEIBju+VqK7uPPWPY= Received: from epsmges1p2.samsung.com (unknown [182.195.42.54]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20181017155423epcas1p2915446b973abf6fffd0f48c11b2941f4~ecFwtwIfD2587525875epcas1p2B; Wed, 17 Oct 2018 15:54:23 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id C7.4D.04078.F2B57CB5; Thu, 18 Oct 2018 00:54:23 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20181017155422epcas1p1644d897c62ceb36b57d33ecd4e3bc81c~ecFvYHYxN2660926609epcas1p11; Wed, 17 Oct 2018 15:54:22 +0000 (GMT) X-AuditID: b6c32a36-b25ff70000000fee-f6-5bc75b2fd120 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id E9.A6.03743.E2B57CB5; Thu, 18 Oct 2018 00:54:22 +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:22 +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 11/17] thermal: rockchip_thermal: enable+check sensor after its setup is finished Date: Wed, 17 Oct 2018 17:52:37 +0200 Message-id: <1539791563-5959-12-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: H4sIAAAAAAAAAzWSa0hTYRjHfXcuO462TkfTt1mSCz+oeIuMN03xg8IJ+xB9EdsHHXqalzll RyUNwksX0zYyMctMzXvLsuY1MdB5WYYKqZiYZpaEulRkiCmEOU9++z/P8/s//+eFl8KYAkJO JWkzOJ1WpVGQErxzwMvX119pUQasWXxQQW6dCL170kqgXzYLQK/1QziqnpomUF/eJEB7P6wE +tSVL0K3K2pxVL+0KEaTPZUksukHAapc/ypGS4sGEi23uyJT8wyJdnqqcPThmw2EM2z+xjDJ ViyMkez7inkx2zEbxNb1rohYk/E+yc5N95KsvmCdZA3tRsB2TVdh7MfybZy1zHSJWJvJ/Yr0 muRiAqdJyuJ0/mFxksS6hi0svUR6Y/CRVZQLdiRFwJGC9DnYY3iMFQEJxdDdAM5uLmD2AUNv A1i9yhxC+tEiQoDeAvj7adN/xy6AVVUmwk6RdDAsuWcERYCinOko2N5C2dsYPYTDnzYvu3ai r8OR1mKxXeO0J8ydqiftWkqz8N78MiaEucOR4dKDlY77/fG9GtKeBelSMexrWiMFKAJWvOnH Be0EVy3tYnsupN3gxFCowJfvH7rbgAtFK4Ato8MiwRACByyfCeE6GVzfekAIZiksvMsIkoU7 Vo3wxmcAbpjbwENwogY4GIELl86nqjk+MP2sH69K5TO1ar/4tF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vXbwm453Q1I7g3+fHfZhg+nE6ZG bJc3n9SV+TyTl+1Klt6io67HWh7/0Cjy/bi8dvodJZbijERDLeai4kQADcsMZnwCAAA= X-CMS-MailID: 20181017155422epcas1p1644d897c62ceb36b57d33ecd4e3bc81c X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20181017155422epcas1p1644d897c62ceb36b57d33ecd4e3bc81c 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 explicitly in rockchip_thermal_probe() (also check sensor after doing chipset specific control operation). * Remove superfluous second sensor enable+check attempt. Cc: Heiko Stuebner Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/rockchip_thermal.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 90d8175..ef9e2aa 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -1161,9 +1161,6 @@ static int rockchip_configure_from_dt(struct device *dev, return error; } - thermal_zone_set_mode(sensor->tzd, THERMAL_DEVICE_ENABLED); - thermal_zone_device_check(sensor->tzd); - return 0; } @@ -1272,6 +1269,10 @@ static int rockchip_thermal_probe(struct platform_device *pdev) } } + for (i = 0; i < thermal->chip->chn_num; i++) + thermal_zone_set_mode((&thermal->sensors[i])->tzd, + THERMAL_DEVICE_ENABLED); + error = devm_request_threaded_irq(&pdev->dev, irq, NULL, &rockchip_thermal_alarm_irq_thread, IRQF_ONESHOT, @@ -1284,11 +1285,8 @@ static int rockchip_thermal_probe(struct platform_device *pdev) thermal->chip->control(thermal->regs, true); - for (i = 0; i < thermal->chip->chn_num; i++) { - thermal_zone_set_mode((&thermal->sensors[i])->tzd, - THERMAL_DEVICE_ENABLED); + for (i = 0; i < thermal->chip->chn_num; i++) thermal_zone_device_check((&thermal->sensors[i])->tzd); - } platform_set_drvdata(pdev, thermal); -- 1.9.1