From patchwork Fri Dec 4 02:55:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 337718 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp819255ilb; Thu, 3 Dec 2020 18:59:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEUfbXVOx289eVCy4f+IR8JV0iuTpS4kg3JRrYFkPfBVvJrfIDPv9UTtUQ71+zpfcVg7yW X-Received: by 2002:a17:906:7087:: with SMTP id b7mr5127279ejk.70.1607050707391; Thu, 03 Dec 2020 18:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607050707; cv=none; d=google.com; s=arc-20160816; b=VsIXBZ6Thhao2zC88hk998YwNtkvph0YtE0ARECzvAqczDlVrYZ78qLP++Bb0+vCiB Z25tOmWB8+E2RB7xNQRCC46vfC9rxiwKRitcD9aM/OhYiG2xpp2PcWu/7tDbCNMxvUpL MwDDrv2ivORmSZSW7RIBE0PNFHozt5nn42R1OAmjCOPdXGflX3Vjbnm+5u0rjamtywL8 F6pC4I+OI/w+R2un4hIRKuhQKuA6kVGFJbJBj0Y2SmcypJ49xG/m001BWzI2cF1ykDGZ 1d7LIIwBX0FFiLZ0MugNZufnWS9pSeWSJsc6/fhyBs6vCOZbLouQnjMPhTptsjir/Xm9 4V/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pm8KWurwPbsiA2+0aZke00zkEXKFA8bztpS1CwLqd5E=; b=UYcEpVmOVZ1g89bQXfH5VSxV/SQROu/qJwvJPGHP0MGoJ7tEMHaTDWFzgoHgqmXwal XFxS8jOMFXKGcioDBXBtyOKkxzjVXbrio//tzBRLJj9S4LmjVM71RH/+pqDNgrOyVGTW 4SUor7xjldmW3nCuvcHG6HugQM3eY8yw99U5H3TRaPhRftcWJwpV9Gq4OUWJmwXPYnJF CMbDelMW7Q7aVZqxdPnlp0EnQCCmmHHRRN7e+A+7wxRJwAWgh3/Xj/AQzZWIyp2uIKMG pp+tOBcGTQWDjSW14TosE/dTfXRVCelUHNascLEA/Oeddk0I3ie0AHhFmyWymYXHHaiq 9s4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+nskjOP; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si558396ejr.557.2020.12.03.18.58.27; Thu, 03 Dec 2020 18:58:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+nskjOP; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727349AbgLDC5a (ORCPT + 15 others); Thu, 3 Dec 2020 21:57:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727315AbgLDC5a (ORCPT ); Thu, 3 Dec 2020 21:57:30 -0500 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD83BC094263 for ; Thu, 3 Dec 2020 18:55:42 -0800 (PST) Received: by mail-lj1-x244.google.com with SMTP id j10so4921138lja.5 for ; Thu, 03 Dec 2020 18:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pm8KWurwPbsiA2+0aZke00zkEXKFA8bztpS1CwLqd5E=; b=Z+nskjOPjApEuAj+N17fYTek4itpeFVt9PR47He//27Dc4ge/6SXhO6JdrxkScCFC8 Wxno+B4Q5sz7NGczbgEMt2TYMCjqUYyQIbdUA1TilccGRFmXk5+5CLwyx9T7wN03OAGX sCiGH7ZC9n9F953a+LF9vWP6So8l7+wopmrlD3lpC+LCuFjqih4sQ4XUuo0mdWKc7b8+ YLyWlhqxNo1fO9xFGzvmEo8zX/OfCJ567MOar1eH8DYsObsAwY/x5tiFyTr7VQOvMpBa stOrUQeM+k3S3PlRaW5VdUhoaJZVbFGzzSdn6+LArw09bCvioaznBD6c870H703y2qWU IHNQ== 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=pm8KWurwPbsiA2+0aZke00zkEXKFA8bztpS1CwLqd5E=; b=bhBQLgSUuZMf5uLXTwMcChAzTFy8a7PSblVt2qLhGgQGMxsppqNon1BUl/KfBTSU4t oqvxNHEi+sjf+oIjJ1Itefa96TUfZ+vlQ68Sb33PqHeRrYjdIk1LtcqeeW41eps6edfK 1tYIBv3zPNLmWuRnJQRm3cGjrnMtChkFunwYnsogasEYPNXq/Gkkhx/INhZCa7WPR95O Lk2CIUfUpy8WlBNDbbdDEP58YF+FMmQeKKnoFxpGUTw5OjFIndYH/lrMqfggrp8bR2W0 E55I3pMERv253Ed91SdWVfwikuzAHW1F0R3DV01OKDSEhIxhqON0uLtYtjr3Nb/TqnhY GDew== X-Gm-Message-State: AOAM532uRGfqd/WxHAGQcuUtzbp1lIRpcfcWQyJpNBnu7dB094lnIoFD HZoqVZJCYLh9UFLzxfgxvZz0RA== X-Received: by 2002:a2e:3c12:: with SMTP id j18mr2503832lja.192.1607050541253; Thu, 03 Dec 2020 18:55:41 -0800 (PST) Received: from eriador.lumag.spb.ru ([188.162.64.117]) by smtp.gmail.com with ESMTPSA id b8sm1131667ljo.68.2020.12.03.18.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 18:55:40 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Zhang Rui , Daniel Lezcano , Amit Kucheria , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, Manivannan Sadhasivam , Jishnu Prakash Subject: [PATCH v10 11/15] iio: adc: qcom-vadc-common: scale adcmap_100k_104ef_104fb Date: Fri, 4 Dec 2020 05:55:05 +0300 Message-Id: <20201204025509.1075506-12-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201204025509.1075506-1-dmitry.baryshkov@linaro.org> References: <20201204025509.1075506-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Scale adcmap_100k_104ef_104fb temp values by the factor of 1000 to remove extra multiplication in qcom_vadc_scale_therm(). Signed-off-by: Dmitry Baryshkov --- drivers/iio/adc/qcom-vadc-common.c | 70 +++++++++++++++--------------- 1 file changed, 34 insertions(+), 36 deletions(-) -- 2.29.2 diff --git a/drivers/iio/adc/qcom-vadc-common.c b/drivers/iio/adc/qcom-vadc-common.c index 441843827f05..8682cf1e213f 100644 --- a/drivers/iio/adc/qcom-vadc-common.c +++ b/drivers/iio/adc/qcom-vadc-common.c @@ -23,40 +23,40 @@ struct vadc_map_pt { /* Voltage to temperature */ static const struct vadc_map_pt adcmap_100k_104ef_104fb[] = { - {1758, -40}, - {1742, -35}, - {1719, -30}, - {1691, -25}, - {1654, -20}, - {1608, -15}, - {1551, -10}, - {1483, -5}, - {1404, 0}, - {1315, 5}, - {1218, 10}, - {1114, 15}, - {1007, 20}, - {900, 25}, - {795, 30}, - {696, 35}, - {605, 40}, - {522, 45}, - {448, 50}, - {383, 55}, - {327, 60}, - {278, 65}, - {237, 70}, - {202, 75}, - {172, 80}, - {146, 85}, - {125, 90}, - {107, 95}, - {92, 100}, - {79, 105}, - {68, 110}, - {59, 115}, - {51, 120}, - {44, 125} + {1758, -40000 }, + {1742, -35000 }, + {1719, -30000 }, + {1691, -25000 }, + {1654, -20000 }, + {1608, -15000 }, + {1551, -10000 }, + {1483, -5000 }, + {1404, 0 }, + {1315, 5000 }, + {1218, 10000 }, + {1114, 15000 }, + {1007, 20000 }, + {900, 25000 }, + {795, 30000 }, + {696, 35000 }, + {605, 40000 }, + {522, 45000 }, + {448, 50000 }, + {383, 55000 }, + {327, 60000 }, + {278, 65000 }, + {237, 70000 }, + {202, 75000 }, + {172, 80000 }, + {146, 85000 }, + {125, 90000 }, + {107, 95000 }, + {92, 100000 }, + {79, 105000 }, + {68, 110000 }, + {59, 115000 }, + {51, 120000 }, + {44, 125000 } }; /* @@ -418,8 +418,6 @@ static int qcom_vadc_scale_therm(const struct vadc_linear_graph *calib_graph, if (ret) return ret; - *result_mdec *= 1000; - return 0; }