Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp119436ybl; Tue, 7 Jan 2020 15:22:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyVf9rk1HWaOn95tmmKeaQYVsT/UwhX6cKfPcpWQidim7g1BAsoq5vLfV3QnGiIi7xGQJnH X-Received: by 2002:aca:c692:: with SMTP id w140mr768935oif.139.1578439374270; Tue, 07 Jan 2020 15:22:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578439374; cv=none; d=google.com; s=arc-20160816; b=OcH8U3Y8mloLiQIeig7OclgYwk4eUDkRx5aXI/HFYXHPKYIW4Ub8XObNIJGCDUOVX7 dgLW0nSCw1mUa17A7VCIMtX3gUpj2Xg7DlPJ3mhaEE2L1wJESnNuci9J1e+iDSEhjU3f JcKUisGRAAxOhR3QJ/5mS4UhLAxfgD9jmknZ1pdqsU/CEbGq4lQJkuljxN1pdELT9QXQ sjzlCSU68f+5lCGnex173U3B+nbU74sv3ogIV2V5Ih3mgYynxBymJcNCsbQ4UJYkve3Q 5C/wCDwNuIxwIPFv0hAhgqlaaXC/gCh8pVO/1u/mlzxJ841k0eyqNTl7nUQxUw2QQtPO nrBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DFqhTgxbHey+swfK5cQ0/kLBEvOg3feXk6FuLBIj6rg=; b=KWS2rWx/s2ZsApCdW2a3xfFNpSvBM6ztI5hqEbYWtztelIPfnYeiuzaOpKIt/gEq77 QuH9MtGX9MCNyL1IM5tDoB+y3UxtmN+2G6uJpi7U+JTyzAOJBsBdTuz/EOgudoDM/bm+ P2mT+usFTVIHPfbpHBxh2fK18YO8jE+0+KnjVnuZkA4Rx5EgUQAeSesHcOEDd8ttGeht luU3rjCG9vRZzB/mSboUEamU4tFQHzAGTy4btaA6O1ndXjC0kf2nukVVvRTiE8wSqPw2 IijxVm4Tvnm+hoZMJ0R6GesTEoi4b04qssU6xRf7A5XTyAMz982welLRt6lf2HBQz4tx jM+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=nDisnmX+; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l16si717239otj.59.2020.01.07.15.22.42; Tue, 07 Jan 2020 15:22:54 -0800 (PST) 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=@googlemail.com header.s=20161025 header.b=nDisnmX+; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727655AbgAGXVB (ORCPT + 99 others); Tue, 7 Jan 2020 18:21:01 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54801 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727074AbgAGXU7 (ORCPT ); Tue, 7 Jan 2020 18:20:59 -0500 Received: by mail-wm1-f68.google.com with SMTP id b19so599931wmj.4; Tue, 07 Jan 2020 15:20:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DFqhTgxbHey+swfK5cQ0/kLBEvOg3feXk6FuLBIj6rg=; b=nDisnmX+PIgFhWQVRWdesWNv9ixcj6x9PUEZ34fWlUmNl4k8eta3jASZ3azwX2INHe QxZljfKPiaAHTT6Q85B6WzdpkTBA3/ymeGOCRWoz5OFGEQeoqrv4oEl7luT115kwfzVo NcWx0AnOU61d5xFxAHhGlgVzQ7hgMWkJyY3HFRkO9mjTfBnJA3ELrMJBgFPcLqb6wHdO Q9LePQ4MDbstvjExvSoFyL6kHfLui9Wu5yQcBlkSJ+XnJBKv3cPDG5IC0S13TbspXkr4 4ow4IhTq1sI44jfXmwA1od3gLhyi698C8Gv3eTo2ZFQZJBq1c3ZU5g2XXs5TQmLPoiAJ gkNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DFqhTgxbHey+swfK5cQ0/kLBEvOg3feXk6FuLBIj6rg=; b=NXGbLcp5+cGPa+mertLPYWBWGnrZHqNV0s0N3IpHY8qKBi7ztIKQJED8j0BYDkpCC2 vRRUTb/MaxYUpqypIpaV1Wa5rHW30LTLblvKeRtxNaFm4PAdOR858PN7z/p4M9BKVbQv 43VcBhflr/fxcR5WT3HjtnLb9f2GGIB0Iz+4rb+CDIRVyOiR6zmD1xcvZDVs2Luvtkh4 sEPUEA2xG8H9LOnw7bS40D0ac+l57YVTyDMssRO15wKtLbgS7JiGoXwCMr3oAkYpo+T+ 3+op9oBmKfz6G85mKGxWWPD+RzR2xCVvV48on6UerTklCVF4zyq0tyvfIJQ9UsEZSfJV 3KuQ== X-Gm-Message-State: APjAAAVm0Hf5gvkmOxh7f34oa+AEfoviO1lKISU4iWQJGpem/EDmhXyz uvpXawnlt0m5KQrONxURQYU= X-Received: by 2002:a1c:4454:: with SMTP id r81mr626445wma.117.1578439257221; Tue, 07 Jan 2020 15:20:57 -0800 (PST) Received: from localhost.localdomain (p200300F1373A1900428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:373a:1900:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id n3sm1669577wrs.8.2020.01.07.15.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 15:20:56 -0800 (PST) From: Martin Blumenstingl To: rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, jeff.dagenais@gmail.com, edubezval@gmail.com, Martin Blumenstingl Subject: [PATCH 1/2] thermal: generic-adc: silence "no lookup table" on deferred probe Date: Wed, 8 Jan 2020 00:20:43 +0100 Message-Id: <20200107232044.889075-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200107232044.889075-1-martin.blumenstingl@googlemail.com> References: <20200107232044.889075-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A "generic-adc-thermal" without "temperature-lookup-table" is perfectly valid since commit d36e2fa0253875 ("thermal: generic-adc: make lookup table optional"). On deferred probe the message "no lookup table, assuming DAC channel returns milliCelcius" is still logged. Prevent this message on deferred probe of the IIO channel by first looking up the IIO channel. Signed-off-by: Martin Blumenstingl --- drivers/thermal/thermal-generic-adc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/thermal-generic-adc.c b/drivers/thermal/thermal-generic-adc.c index ae5743c9a894..226e3c2b7469 100644 --- a/drivers/thermal/thermal-generic-adc.c +++ b/drivers/thermal/thermal-generic-adc.c @@ -124,13 +124,6 @@ static int gadc_thermal_probe(struct platform_device *pdev) if (!gti) return -ENOMEM; - ret = gadc_thermal_read_linear_lookup_table(&pdev->dev, gti); - if (ret < 0) - return ret; - - gti->dev = &pdev->dev; - platform_set_drvdata(pdev, gti); - gti->channel = devm_iio_channel_get(&pdev->dev, "sensor-channel"); if (IS_ERR(gti->channel)) { ret = PTR_ERR(gti->channel); @@ -139,6 +132,13 @@ static int gadc_thermal_probe(struct platform_device *pdev) return ret; } + ret = gadc_thermal_read_linear_lookup_table(&pdev->dev, gti); + if (ret < 0) + return ret; + + gti->dev = &pdev->dev; + platform_set_drvdata(pdev, gti); + gti->tz_dev = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, gti, &gadc_thermal_ops); if (IS_ERR(gti->tz_dev)) { -- 2.24.1