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: 10832953 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F03B1390 for ; Thu, 28 Feb 2019 12:28:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E4942EC05 for ; Thu, 28 Feb 2019 12:28:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 523052EC21; Thu, 28 Feb 2019 12:28:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03BBC2EC05 for ; Thu, 28 Feb 2019 12:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732477AbfB1M22 (ORCPT ); Thu, 28 Feb 2019 07:28:28 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33870 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732457AbfB1M2Y (ORCPT ); Thu, 28 Feb 2019 07:28:24 -0500 Received: by mail-wr1-f65.google.com with SMTP id f14so21767118wrg.1 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=AbwGFkh5gbkq9oPCyk3JqfJZ/Zdn77qSQKJAH1CRveB77sOvhD7toDm3dRUwzwuXq7 J9QGIHe1whxYRlJSRulw+MVgzioOnXEL/i+G8L2Cbl/Vucq6qINSPspCOtXEqqfjS/fD At6eGATF3zzvsLjWqcET3nBTcIoV8NJjV+lNG/rbkI8mAAuap7THKxLYwNZJZe5f2k7J 89f/JbiMbkLEhsurhfLYawq5b20PgQ8oXuE70qYDNOMfpOgLQWfGUTqoL/1PeGQwd2+j tVE5zDilCynPa/STYfshySN3TIc3Tq6iAQ06B40KkNrVVnphq+rPa/m/GKe/Fb1+O8St SUsg== X-Gm-Message-State: APjAAAW/uZrYSZN1nnb8dEMzFuE0tNFnkzG/xC1vcg1jqA22NvRvzEPr Z2zK1vzkAoDhuJJkymtaJnVf/g== X-Google-Smtp-Source: APXvYqyVEcnr+RS0VqL1Tr6nvEC8878k3vp8lZJN6DalyxCzkSHTJk8NELmMmzHTn0fmEOMjH/lrow== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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