From patchwork Thu Feb 7 10:49:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 157743 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp611189jaa; Thu, 7 Feb 2019 04:57:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IbfoXJxMCxh2DKVCOuB5UTjxZn9SF7+kCx3fYfQnw4uA6aaXi3SBzLjXAF/63SX8HmG0Mki X-Received: by 2002:a65:40ca:: with SMTP id u10mr14772243pgp.321.1549544262980; Thu, 07 Feb 2019 04:57:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549544262; cv=none; d=google.com; s=arc-20160816; b=sWbEiFDARINroDtgSdpDO2Vy2Jkwjx5rIc4XJw6IcuXTlFE63xDCGGhkjpbGtaDTNJ vZ4LmYeaJJ/6brxFtde5nNTi7tXXyKVUwgYlnxWVG9NE1H7dLth1k3KoA8tWA4swXOdc yNnT3FiYudP06GfDUGBFbFYGQaGRVHsRTWyD4pZ4PdE2M6PSFRdyOwsgPN/barw/vf7Y Pi77Mb9h/SSqZA0wAkzFwpkFj9J4mjowGqpPTM0RYJ8DNdXcEhTtzRqNFkjbMK4qv8Hw T/602tqNOTTHNzgqub9gotTu/YERmIYHQRMqn47jgrtgz8lOmZ9kZJZ0iUZyj8onvbp0 36bw== 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=LGT7LQl8gaAE8g7SLNcOrp2SekffeeOyL7EISGdXlo4=; b=QzHGtIDzOtlEzox8e0vaRQYqSuBZMe9b/sNuzACahpm0UoAwuy7WH0zDlaRxE0Dr84 FTf9uqDx2bt0BvYnHGkz6RjQk8uT6ROUqU+23/ZInvdDnAcTcSFDlFLUjtnoiEMSgb9L LK3sLQ8Q51sR/oiRWXN4vAxfJis4YujAokKcsxpK3wb1VW8iEEVr3EXzWr/fMppdgbZx WPB0hNOCjmWBq8ZsMsI4uLkEwcKET39Jq5HaEaBQ3+36doDzuyYMi9QnawFp05OowNcG lWYEZw1TChU8pMczy+4LFSzMqNNi0SEGnibfxp1WnE7FUsIjdXXr/L/hVA3dHHg1R77q wM9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UW7wDvRV; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id m14si8711554pgd.326.2019.02.07.04.57.42; Thu, 07 Feb 2019 04:57:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=UW7wDvRV; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 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 S1727508AbfBGM5m (ORCPT + 15 others); Thu, 7 Feb 2019 07:57:42 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36549 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727475AbfBGM5l (ORCPT ); Thu, 7 Feb 2019 07:57:41 -0500 Received: by mail-pf1-f195.google.com with SMTP id b85so4742834pfc.3 for ; Thu, 07 Feb 2019 04:57:41 -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=LGT7LQl8gaAE8g7SLNcOrp2SekffeeOyL7EISGdXlo4=; b=UW7wDvRVOihlVKEznr9sylhbDeWllZuHdLaOawFFbBC1vK3uFe+DvIm7n7BqhR710X A8qXbzhKm7yMjFgCSHDvTq38KcCg0TWVxo57NvSh7m7sjsFYRehMqKycMJEKOaRCg2+l VRGxQxH4JVG2V/8/rwy3WBXfUFDL2Oym350ol8uU2qXHBnXQqAT0WgBdSsfF97LUpcSJ UhJ2Qg0QQ6cdVHtUOKzSH5JFyO4NunFk2+/QaCXx6JFUynhBXIW6gqjfGpXIAv9AZWkE q1LybO+o/rst7YowjEpZa3E5pfTUW/5tdmTaWeya7DkHFldQyU0jxuFPqBSF1YVjs++9 n1OA== 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=LGT7LQl8gaAE8g7SLNcOrp2SekffeeOyL7EISGdXlo4=; b=snwgut/RyQo8p9gB1dpjzfNsFRkL8OKGR3H6LyiGqTk86i0NX+DP/IuzQcPnpUon7O 2vezUEGjEt3uxROtIfnc0Nf987Xi+PGHbwgrR1clKWgtdkZmPwD2x02j/TsHqMyTpxb2 8stHew/ocZ6u82WkE8yQy6aMLpIzIAZt4Qk0nLGjhfp3LZGnvBMGMzZA7zP/ux+eP3DH q1gozNR1xC25f2ATPVRrLgSATDCUVr6blHdW9TMgwdkyW0+3C06EF8bbQ0sJNpU2bEK3 4TC7xrRupuaG21rR0s+s3qxHqJo2YXkEehB8Au77RRtTr+KVDrc6AsMOA/v+cnxvbp8D eamQ== X-Gm-Message-State: AHQUAuYugjYu4Kq/cn12R0asZdW0YJVSPvdSibkEf1mhA/d/exE7lguA LS/wP3sA4w61ozZyVq9IsxmK3A== X-Received: by 2002:a62:425b:: with SMTP id p88mr16177244pfa.137.1549544260931; Thu, 07 Feb 2019 04:57:40 -0800 (PST) Received: from localhost ([2402:3a80:c80:4138:75dd:3900:1d90:762f]) by smtp.gmail.com with ESMTPSA id b24sm2380667pfe.136.2019.02.07.04.57.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 04:57:40 -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 v1 24/24] drivers: thermal: tsens: Move calibration constants to header file Date: Thu, 7 Feb 2019 16:19:42 +0530 Message-Id: <99a7e1fca9db203b2784fcbe0f8cab6993e51a39.1549525708.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 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 a935d2335eea..35e82aaaef59 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 4ed07e607cbc..8a747ab892f5 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