Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp118579ybl; Tue, 7 Jan 2020 15:21:54 -0800 (PST) X-Google-Smtp-Source: APXvYqw+8vnS/+rc0l7EEN7AEZU7aQ7PS6cfQKl7JPO9bvBOBYpJsAsfMhuf4ZjjVGsI6WgR5iJR X-Received: by 2002:a05:6830:138b:: with SMTP id d11mr1994528otq.38.1578439314653; Tue, 07 Jan 2020 15:21:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578439314; cv=none; d=google.com; s=arc-20160816; b=czBJI608bC8Pw1KeqPiCb2P6ptAfKoR6luK0HvOSrArptrtOxbPAS5yKNCd+a1Qrl4 Qj405Klc+Ohgb9liZtYu+gMzLmoq5paqAA2V9HD6iUWtgznE2fMsaox7rHhL5reiNubY qzNrx/RsSoysJ8Hz5eNNRy51z0alhbMaO8LJox5uJbOMtaSmCRHiBz83YKnYsbFAXoT1 +9GZGh/p7lgYYXKk6LBLQ0ZooZ5w0EevFJX8f1ZnVh0q/fTkry6U5O/MCDp3l4yft0HB oz1RBlXA8PYIhJJpQye55gIzuuHJSa1VQu4CI4jNnk4BWl8IDgYHPCFddxqV6qq68ZJ/ xwbw== 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=vV3UUGvvS5e8WsB7ogZ/noPCe30PWO4cAHloQARZuMU=; b=nB4EpfVrZYMXmy7YTct4eBV2Ny/aJJBPm3gHoFEYtDp6oX6l17ohSVzZXw3Tw+a+tK oQrg/IjBe+EUQttPKLj1tunfpttGR9iiwQneczSkp5PgeepD/8D4FaAlb2v2IWA+49xA T7YTjvrs4wE2srj2BcziisPoWjh9WAHTYalIyAbIln5907jF0s27WvXYsSw7SovsHOqW XmEAD3jOLU9XsQrRcEf88AOthPRHJiZvcgloXghnB3+rDSMgIyu1SfFfMxEwU2mvWFEg 0kVadFO+hrjGQJut+i/VgcpDzrvLLVJPOA02Jajo4dTwvseUR2rz5jPN/Oh1iOmiNca0 OhkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=QWaRBgfZ; 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 94si821235ott.8.2020.01.07.15.21.43; Tue, 07 Jan 2020 15:21: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=QWaRBgfZ; 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 S1727681AbgAGXVC (ORCPT + 99 others); Tue, 7 Jan 2020 18:21:02 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:36863 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726967AbgAGXU7 (ORCPT ); Tue, 7 Jan 2020 18:20:59 -0500 Received: by mail-wr1-f68.google.com with SMTP id z3so1462859wru.3; Tue, 07 Jan 2020 15:20:58 -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=vV3UUGvvS5e8WsB7ogZ/noPCe30PWO4cAHloQARZuMU=; b=QWaRBgfZaWwF/o5TtRmsgFA8xMd72UlNn8DRyiFN0jTom3bemOIPUhrrsKBbPAIFPJ OfNPUerjyxw6FJm3VOSYYi5Jgr+yKEMboXZfvsuYAU45QDTIYTNGFT7b4Dnd6llum1GO OYVNZfemZicnDMO/Gbi6LPR+cmcbUamwBbbKb6PmT/ZELPKX9wA3PiUldg1RwEFbpZJn FChDB9Cwd2uWGi82zr/EoW+/0IdYDj9pSitFG9zN1kP+GK+xahlLOedxl0bQf6TtlRGj mcHrgAF6imjQzl6jZDR9Rxjj8vQL2u3++H3O10BNjbxcTxdtE1Aaad7VlOpHNIRI7GDf JY3g== 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=vV3UUGvvS5e8WsB7ogZ/noPCe30PWO4cAHloQARZuMU=; b=GoOok3I9YdI4GEpFvm9azGU1npvOzepQubPtSiFx7SHHH639LQepTMQZWRuSjmqrkq rOPOxisUFuG7/pMW4tt94WIB2UOkxZTOpdlQnOPz+Q7Uf2Fm+2nkLEbJ3qsRzODtBnEt LO6kSQWv6E7bhKY8udwcmL1jpAfMbQKfShMhPcWE/Bnt9o3TSnipf3KS2jwSAV8m61GP 7Pu2lBPjjbIDKXc3ibWOePrMssWwXTYBwPZxiB+TUTDDQdd0sbbuw1U36M7Vhh3iwsgU aoZxUiGMZIAUtqNO7vT1wPu8aAOv7hQCGkeAmT8Q3o7asdYsu4lCS9keTzq2gALTb86+ MQBQ== X-Gm-Message-State: APjAAAUBgPSbsBig7vELt46cO+UtQjFRkLOxcf1G07/lB7Ei/1aubTdA yOquuPffsxebKIL4yZify0D+z8r3L9I= X-Received: by 2002:a5d:62d0:: with SMTP id o16mr1319611wrv.197.1578439258079; Tue, 07 Jan 2020 15:20:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 15:20:57 -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 2/2] thermal: generic-adc: silence info message for IIO_TEMP channels Date: Wed, 8 Jan 2020 00:20:44 +0100 Message-Id: <20200107232044.889075-3-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 Since commit d36e2fa0253875 ("thermal: generic-adc: make lookup table optional") "generic-adc-thermal" can be used with an IIO_TEMP channel. In this case the following message is logged at probe time: no lookup table, assuming DAC channel returns milliCelcius Silence this info message if the channel type is known to be in milli celsius. Keep this message when the channel type is unknown or not of type temperature. Signed-off-by: Martin Blumenstingl --- drivers/thermal/thermal-generic-adc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal-generic-adc.c b/drivers/thermal/thermal-generic-adc.c index 226e3c2b7469..73665c3ccfe0 100644 --- a/drivers/thermal/thermal-generic-adc.c +++ b/drivers/thermal/thermal-generic-adc.c @@ -76,13 +76,17 @@ static int gadc_thermal_read_linear_lookup_table(struct device *dev, struct gadc_thermal_info *gti) { struct device_node *np = dev->of_node; + enum iio_chan_type chan_type; int ntable; int ret; ntable = of_property_count_elems_of_size(np, "temperature-lookup-table", sizeof(u32)); if (ntable <= 0) { - dev_notice(dev, "no lookup table, assuming DAC channel returns milliCelcius\n"); + ret = iio_get_channel_type(gti->channel, &chan_type); + if (ret || chan_type != IIO_TEMP) + dev_notice(dev, + "no lookup table, assuming DAC channel returns milliCelcius\n"); return 0; } -- 2.24.1