Received: by 10.213.65.68 with SMTP id h4csp3853309imn; Tue, 10 Apr 2018 05:48:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx48QcjfiI6Im5EXx3JqYee/7hJUdDUFJOiS9vb85sBMI5NGz5Sl7YdGBMcbGVAHvp7+wIiuh X-Received: by 10.99.165.22 with SMTP id n22mr193631pgf.53.1523364505872; Tue, 10 Apr 2018 05:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523364505; cv=none; d=google.com; s=arc-20160816; b=sxq/uzuUlOQxE43+PT29loOFgXD4EiW69dEirOVVfSSYQFr4VsOJX0utGw0WW7CvK4 nb6fApJkpqmtjeqKP6nMS0c4mLxW5sDY9pJsn8ZVFRnc1fLm5mhshFNEDUieuFXSgjth GAVdWnZATI5lSr1fkvCzxcAhUxI7YLJtIOZxPik8W0CutxDa3lh7eRIcWXTldDJqINjx OdSFfQvpcttR3vbfsVbR1yGe/ZCfKmksL/BjYBvj8LUX5AFFl3qDwujjmY2zfNRD9+8v uRqm1JLduvegCdP+FcEksRPCx88T8Ny59AfgHr2Tow0naQQR6g9mp+l75x50KzJVXtpd OsJg== 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=eb7iON/etM+4IppXiOzX2qKp/+KfLwGF/wbpANlsmKM=; b=ehnvG5wTMZFKc8jC3MRFa56AdD3pP0LFZg42GlF9V/AEWtE1FY+aDTJV61mGHXGQYC VXpETrgIjaC3S3OqFMblgyb5Wof0Jf2fNCS/5TlEibeP2cZWxq1a2E+DBC0/OGRiYfPb mCdh9AUxRl+1JCfyJQheeH5N61/XAra+j9yKzIsD5EtBuCXknAMMMEgY4El+Op3QjkT2 kNfuUol4uuw4rvuN8oMUWooRCJfWagKmdAcRx4Bky3z8nNLl+c0psEdddS17kkA9dJHc Eaevho+O+x/J5XQ/tjYNr6QlINFjLCeRUrbpPYwT4rjrItxcrfWCpWPzapS8DAjpWQ+g CB4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ByD/uwyA; 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 x14si1789309pgc.165.2018.04.10.05.47.48; Tue, 10 Apr 2018 05:48:25 -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=ByD/uwyA; 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 S1753530AbeDJMnq (ORCPT + 99 others); Tue, 10 Apr 2018 08:43:46 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:57481 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753106AbeDJMnm (ORCPT ); Tue, 10 Apr 2018 08:43:42 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20180410124340epoutp0316a982fba9afa283c051781574f99cb1~kE6-9KQrE0503205032epoutp03_; Tue, 10 Apr 2018 12:43:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20180410124340epoutp0316a982fba9afa283c051781574f99cb1~kE6-9KQrE0503205032epoutp03_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523364220; bh=eb7iON/etM+4IppXiOzX2qKp/+KfLwGF/wbpANlsmKM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ByD/uwyAfqIIxKE1tdNnV+tHfTIasY0s+9TRNErcVZM/Sre48UerHcYtLl6rKIsYN NN6OsDyCoH/75Jvvim4PWLF9sK0BatA+gOD5BGBPGjYMoFw4nR7qvN2kEc6fZ8bHbH VEzMw+gsgc+lGWH/mBarqwUwLoyyZMWhEdjraceM= Received: from epsmges2p1.samsung.com (unknown [182.195.42.69]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20180410124340epcas2p1d862df9611339c359aaa1ba37b381ba0~kE6-mGvSU2862828628epcas2p1R; Tue, 10 Apr 2018 12:43:40 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 50.F1.04068.C71BCCA5; Tue, 10 Apr 2018 21:43:40 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20180410124339epcas2p31bdbdc3d5fc602b3c7fe60b02e8faacd~kE6-IFw2_0880708807epcas2p3x; Tue, 10 Apr 2018 12:43:39 +0000 (GMT) X-AuditID: b6c32a45-6ebff70000000fe4-bc-5accb17c8053 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 69.2E.03827.B71BCCA5; Tue, 10 Apr 2018 21:43:39 +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:43:39 +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 07/17] thermal: hisi_thermal: enable/check sensor after its setup is finished Date: Tue, 10 Apr 2018 14:42:01 +0200 Message-id: <1523364131-31059-8-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: H4sIAAAAAAAAAzWSe0hTURzHO9u9Z3fm4jYlDxr+seoPjSxD46ChlUY3VFBChEHYyotam65N TaPAR5SvmT21tSw0UYcPtOlMJzjN9yPEuImZZYqYb1pmVlLNzf8+h9/nfL+/A4fiizWkKxWf kMSqEmRyCXQgmjo9fA/dqB+UHtnUQ1xfXEfiWUsPwDWaLgI/f8eRuD1jFOC/XxZI3G/M5OFb 2lICv5yZEuDRFh3EFs0bgHXLHwR4ZqoA4jmDC26oHIN4o6WEwG2TFnBiN5O50g0Z7achyLzW fhQwjeO+TJnpK49p0OdAZoIzQUaTtQyZAoMeMEauhM/0Fq0TTM+YkcdYGtzDRVKH4zGsPD6F VR0OuOAQ93h6ASpzdqZyFRaQDvTCXCCkEO2DLL1FRC5woMR0M0CGZ/l822EdoPyah/xtq/xt lt1qBWi8PNdu/QKofMkMrRak/dC9O3qQCyjKmQ5BhmrK6vDpJwRanejaSnKio9EQN01YmaAP oPWVvC0W0QzSbAzb29xRX/cD0spC+iz63bZCWoMQfVeAvk2ZoE0KRnX9esLGTmi+xyCwsRua 1dcD24UsgH40m+yphQCZ6sQ29kedPSNbDXx6F8ru3BRYt0a0CGXftisMGrlfbe86iQa6SqHt xTqAWo2ZZCFwfQF26MEeVqlWxLLqo0pvL7VMoU5OiPW6lKhoAFufxPN0MygeDu0ANAUkjqJC 84BUTMpS1GmKDoAovsR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UYN8tVdtvkogazx0osxRmJhlrMRcWJAL8Boj91AgAA X-CMS-MailID: 20180410124339epcas2p31bdbdc3d5fc602b3c7fe60b02e8faacd X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180410124339epcas2p31bdbdc3d5fc602b3c7fe60b02e8faacd X-RootMTR: 20180410124339epcas2p31bdbdc3d5fc602b3c7fe60b02e8faacd 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 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 1936eb4..d4c5055 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_device_toggle(sensor->tzd, true); - 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_device_toggle((&data->sensor)->tzd, true); + 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_device_toggle((&data->sensor)->tzd, true); - thermal_zone_device_check((&data->sensor)->tzd); - return 0; } -- 1.9.1