From patchwork Thu Feb 28 12:21:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 159368 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp577593jad; Thu, 28 Feb 2019 04:28:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IYVUXrPCuOkV7aUO5QGjZtBOUoqbCHRVFWnt3b6G4AiHX42Scw3izfuRuHPoVFZSFKuWLsO X-Received: by 2002:a63:d453:: with SMTP id i19mr8192369pgj.237.1551356912190; Thu, 28 Feb 2019 04:28:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551356912; cv=none; d=google.com; s=arc-20160816; b=nfQvloi098LDFjjeXsgTG7p6IxdI17eUJkrAjDdCvNsIHPT7KkqmMv9t2EBgwxPyw8 1J5RXRBFtZ/iNZskM2Jsj3RKaaQ3uUH5eiaKKt/f1sFvG4d9AszXoBTj0dAAMf0dj51I EpEkhFNPYgouRGf2wggcPyvQ4w4HTuBQ4QpaQAaKt2Twy73iPZyhj4idVreKxR4w1eKX EKzdxSvEJNzORjdUNJO9vIfePZqEusBsPalXd84s9SZ6E7IDBxz/kUNSxpbJyCEzTwOB 9CRHHZvTHQSNijtxO3lMmORqC86u3GaHM2nLx7tESShp0gnzRD3nXCBRg96HFNihYw7l XMmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=z0Pv9W6V6xAvYLrMMAqJDtvisCVEQyxnavBeNRE47KI=; b=kQkI3++3rIaFisjsKudmlN2Z9fQ+hmWRCHs1LaNB22N9wGlaQZU29hFIMPEqABF7YP HEoTDPsWbOOn+omuz6gxwDejj0RB4ANrJp9/+Xgo4TjWOKStl95oCDXErIxw3pLCFcHg 95BV8Hk7AVBw8Cm3M3cF5DoMGsrRbRezJk0OZsL7G1rhAj14Y8V/FS9+opEPlQILXd0w 5kxNTkukbIFNvobK8fEXTwJ0lKRmoUdF1ku7I3zu6mO2k0l6BmHGkN648ecXQHu38fiq UX+zlPxR/Mlu/AQhRpiBZhldHbQuJutSag9Ade33UWim/LC6sDMT6qQ1SEa+N3t98Gf0 trog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ywD5FOQq; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q77si18356463pfi.220.2019.02.28.04.28.31; Thu, 28 Feb 2019 04:28:32 -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=@linaro.org header.s=google header.b=ywD5FOQq; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732488AbfB1M23 (ORCPT + 31 others); Thu, 28 Feb 2019 07:28:29 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40620 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732459AbfB1M2Y (ORCPT ); Thu, 28 Feb 2019 07:28:24 -0500 Received: by mail-wr1-f68.google.com with SMTP id q1so21759729wrp.7 for ; Thu, 28 Feb 2019 04:28:23 -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 :in-reply-to:references; bh=z0Pv9W6V6xAvYLrMMAqJDtvisCVEQyxnavBeNRE47KI=; b=ywD5FOQqyHAsy5hEya0LE005z0b0ITcXsfVom/AHXpRCx/3zasTFfE5FHi1tiwBdm5 OasMo9oTGyELYXBY87otuAIrCt9g+2VSTjtOO1lfOdXXSDsNbw7JwOp3syYhILOsi1I7 Qu/yINJYHEKhHD1PZYGpUWUZ3abLBF6CEqOLtIhb/f50+2rKu0Oayhhj3tTiIefQYVrO wIOB3tKhlRYR0q4pTGta01gh6O5ISVrPcWYsGPoUHTLdxBpNh8PVABitcxlii2Mxr37m ehKPRTKVX8RhfWJ/YgeqrVh7f9SPpmHyLRBu0yKOzy9d+WCWVuBoa4nPSNr7Vifyp7Gt rk/A== 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:in-reply-to:references; bh=z0Pv9W6V6xAvYLrMMAqJDtvisCVEQyxnavBeNRE47KI=; b=K9T+24vzR/kiT2BdyWGRhGH/uUTEvrYH1norXB3BjuKSIAEciniIUN/pmF6UoF4cxj k8U3Ak8MedAUVcRuAQFE6fYCnkrvcKwCQMl0nmApttEf4f57ysdcTcUGMrkAWFhSORNu XtHqlcaCYB2sCRS01kzEv8ReXhlS5lnka1b6DmvRQ2Y55AQUTXnHZMVNjx/wm2BdpuYc qJ814PLAS9/L0SrXoHka0mxJz3RtCwW76ic43vK9Rpp4HN5vnkiehVOytJNKVYeLY23G vfHET04JdyA+J21JPhTIn9U7ppQNxSXP1VvHdvPyBAmEeDlir5Szd1uEB+XeQv5Xjc3/ DsxA== X-Gm-Message-State: APjAAAXVYXglOicciquUIbSI7w0dF8zBaxrN/qIofIJNdhFYn/oSfeEJ nkrqzGalGlzxXS9FZaXixxXTORltUIk= X-Received: by 2002:adf:f845:: with SMTP id d5mr6588103wrq.113.1551356902264; Thu, 28 Feb 2019 04:28:22 -0800 (PST) Received: from localhost ([49.248.54.130]) by smtp.gmail.com with ESMTPSA id u134sm4656970wmf.21.2019.02.28.04.28.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 04:28:21 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, Daniel Lezcano , David Brown , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v2 24/24] drivers: thermal: tsens: Move calibration constants to header file Date: Thu, 28 Feb 2019 17:51:14 +0530 Message-Id: <0942161bb30c6eb9fb57cd480ac21a31f4ee0c68.1551355503.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This will allow calibration routines to correctly include the constants from anywhere and allow more code sharing. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 5 ----- drivers/thermal/qcom/tsens.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 5db1aa441910..0fcfe6b30c55 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -12,11 +12,6 @@ #include #include "tsens.h" -#define CAL_DEGC_PT1 30 -#define CAL_DEGC_PT2 120 -#define SLOPE_FACTOR 1000 -#define SLOPE_DEFAULT 3200 - char *qfprom_read(struct device *dev, const char *cname) { struct nvmem_cell *cell; diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index 4a37da63afa2..88d1ccfbc019 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -9,6 +9,11 @@ #define ONE_PT_CALIB 0x1 #define ONE_PT_CALIB2 0x2 #define TWO_PT_CALIB 0x3 +#define CAL_DEGC_PT1 30 +#define CAL_DEGC_PT2 120 +#define SLOPE_FACTOR 1000 +#define SLOPE_DEFAULT 3200 + #include #include