Received: by 10.213.65.68 with SMTP id h4csp3853647imn; Tue, 10 Apr 2018 05:48:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx49nY2J6DPtHHgqmZ85RBsQohsbROb6u1XLlqvoo3lWIPwTDbUqe7vD6IDW3+x1WBr6521qI X-Received: by 10.98.157.157 with SMTP id a29mr237807pfk.39.1523364523158; Tue, 10 Apr 2018 05:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523364523; cv=none; d=google.com; s=arc-20160816; b=xxIAr+ZmINWjYmJPitc89fp01p9A69fa70EvXVsuqIDEp7vrcA7L4RDhZx9PMxMaOj t+XX7VEII3XH6mWxwl5YGnC/r3riVf2iSndrqpQqg3qsxQpC7/+qPVDbGw1QMdZY3vnW 5euu7Ru/6zijIcD2EY7oJnCIRMsaT3u8EaBDqSYaC5GGdE3nletyJc8+W3VuoBIhXQte vhwvppfsKTkq6qC3HnMj2lgaCWeiD5iUhBsDxxkUnvnZtCL9OU5NGSR/KX1Rke0P7xIE Sj+3r/F+RPUei4aO47GLZWUaF/e7q5woRq2C2v3b8tQF8xnMzrxyVWYBnRNryoJFjyuR ZHmw== 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=S8kffDXAINou6drCo5hL9oAyBYQcFTcfFohamhKvpwY=; b=sIefoUc5/s67VHaf78kPMurYiwnYqKh0B9twYCGPVc8LOo26egZP0yCRdH4FIE1rOc LNRiy9RjC4FnecfzW4uX7oonsKvMsJw5thWFw8O37p28enokRLqODGTs5vf6WXXTlTu6 ovvsQWFOsNfktFWSaZ1TFwmr1MkediS5VOIeWszRhNUqDeDAEFsOgbfRgyjcp89Eyf35 beDPR7jmhNhdHBb6rpZ6WNY80+LTZMqTRHqHPWuf6Tjpsjdvrn5WEehZ0T366sv261TI skOR9kyKzRWN2YfOFG7OlBbuszMOGjo9oCr1HR6gwG/V3ZimOKILMdc0P+eBQ1FtgThO /dwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZuYDDYu2; 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 v9-v6si2648452plo.681.2018.04.10.05.48.06; Tue, 10 Apr 2018 05:48:43 -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=ZuYDDYu2; 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 S1753703AbeDJMoQ (ORCPT + 99 others); Tue, 10 Apr 2018 08:44:16 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:32957 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753680AbeDJMoM (ORCPT ); Tue, 10 Apr 2018 08:44:12 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180410124410epoutp01b03bedb0d91f1e0baa381f6ad5235d02~kE7b_ttpP2510025100epoutp013; Tue, 10 Apr 2018 12:44:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180410124410epoutp01b03bedb0d91f1e0baa381f6ad5235d02~kE7b_ttpP2510025100epoutp013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523364250; bh=S8kffDXAINou6drCo5hL9oAyBYQcFTcfFohamhKvpwY=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ZuYDDYu2Yu3AJmw5QEBMLWnHxBiGGogfyXY6iTkpEtY7Rfj/h+26hgfr6bv2RUFT5 oJDIMbpNTu0wYnWGppwM3mlDIo//UVHgpBOX5n8Z1k2og0DnlFBAnmGs2yMfl468mh UVD0Ti4VGiJfhXVLY7DHR2qQcmo+hO0AfJs4P6No= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20180410124409epcas2p3a767d55ee95ee364a262841b5cbfe584~kE7bBWTro1455814558epcas2p3O; Tue, 10 Apr 2018 12:44:09 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id C4.46.04082.991BCCA5; Tue, 10 Apr 2018 21:44:09 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20180410124407epcas2p4c537eb52653af45b85af6b69969c4e52~kE7Zf1k6p2644226442epcas2p4l; Tue, 10 Apr 2018 12:44:07 +0000 (GMT) X-AuditID: b6c32a48-8d9ff70000000ff2-a0-5accb199bb62 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 20.3E.03827.791BCCA5; Tue, 10 Apr 2018 21:44:07 +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:07 +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 11/17] thermal: rockchip_thermal: enable/check sensor after its setup is finished Date: Tue, 10 Apr 2018 14:42:05 +0200 Message-id: <1523364131-31059-12-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: H4sIAAAAAAAAAzWSbUhTURyHPfdt19XiNkUPan6Y9UGrqal0shIjP9xK0a9JkEMvU5ovbCop RJuWb6FZYuWQKSlU8y115ppa4tKlTUXUZb5FJjIVpmQoKlrOi9+e8/s95/zPgUPj4mLSi05J y+SUaTKFhBISH8z+6HxVqzU+aKzYD7W+aiHR0oYFoKbSfgLVTNhI1KsZB+jfwiqJhjrzMPRI +5pA9Yu/BGjcVE2hjdIvAFU7ZgRo8VcZhewGT9T2dopC2yYdgXrmN0DkSTZvbYBitT+HKfaj dk7AdkyHsXXdyxjbpi+m2FlbN8WW5jsotsygB2ynTYezX19uEaxlqhNjN9p840TxwitJnCIl m1MGRiQIk584cjI6RPd1L8yUGtQeKwGuNGRCYc/MtMDJYsYIYEHD7RIgPOAtAPt3TOBIsk9U EnzRBeC2vhfjFzsAzle+w5wWxYTDZ4X6gx007c7cgoZG2ungTBUB12f7cafjxiRCXbOecDLB nIEV2sLDXMTcgO12G8ZP84WDAxWkk10P8t2eNZLPnwqguj6I5yhotOwTPLvBFYtBwLM3XNK3 AudgyOQDuGnsxvmiHMDuFjHPl6HZMnZ4KM6cgEXmPYHz0pARwaICMY8sbFiN4e1rUFPnwPn3 VgO4XjOKlQOvWuCiBx5chipVzqkuZIRKVbJUVVaaXJqYntoGDj9IAGsEvSPRfYChgeS4CH3+ Fi8mZdmqnNQ+A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7dHXNaX4mlOCPRUIu5qDgRAATFObB1AgAA X-CMS-MailID: 20180410124407epcas2p4c537eb52653af45b85af6b69969c4e52 X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180410124407epcas2p4c537eb52653af45b85af6b69969c4e52 X-RootMTR: 20180410124407epcas2p4c537eb52653af45b85af6b69969c4e52 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/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 --- This driver may require some more fixing (probably IRQ should be requested after ->control call). drivers/thermal/rockchip_thermal.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 500cfc3..0b3509b 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_device_toggle(sensor->tzd, true); - thermal_zone_device_check(sensor->tzd); - return 0; } @@ -1272,6 +1269,9 @@ static int rockchip_thermal_probe(struct platform_device *pdev) } } + for (i = 0; i < thermal->chip->chn_num; i++) + thermal_zone_device_toggle((&thermal->sensors[i])->tzd, true); + error = devm_request_threaded_irq(&pdev->dev, irq, NULL, &rockchip_thermal_alarm_irq_thread, IRQF_ONESHOT, @@ -1284,10 +1284,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_device_toggle((&thermal->sensors[i])->tzd, true); + 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