Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp318830imj; Thu, 7 Feb 2019 04:58:38 -0800 (PST) X-Google-Smtp-Source: AHgI3IYYLradsjqZAB89BdPT2N86XFuhFunMTQNBeTRmSim7pBkDWiDuU7jacXWhVXrMJKZCHSak X-Received: by 2002:a62:3c1:: with SMTP id 184mr16154478pfd.56.1549544318646; Thu, 07 Feb 2019 04:58:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549544318; cv=none; d=google.com; s=arc-20160816; b=rztijmljaUMs7kEIvU0pn7uVcP49aHyswURjDcffLuiZ03C/cccS7MN3C5u911yNCm WrHn+ogqA+3Ul5xu5q241AOSxsiZ3EsBYHTaR1NEDZ2rcF+ns/K2fyRpwG/1eshZ/rY6 GhKVQRiN5kR5FlIWL66xxLkk45ulaGxpT6DMMfzlR2J12qL+KRhoXfHZp+dYMEpzWn58 WLdE6bEr+NG3rMBtztPDZ5emggUdS3OFZs7N3GxzkJsVFTo/OfzyYQ0QCsAXeccnLfPk fZ/kWP3YOWFB0TV08eis5OVPLg2wOV9fnpPpUJzEADcSaoa12jU7fRLUMJ0EKm2HwiVI uCVw== 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=B92T6aBKwZ+y5NT1lMjeeUCH8OcjQmZcxQ923Vmjew9YzifFF0c/oecEBySR6BaE0o 7wCq3bcmpDiIBFS9Gpyl0ilZJlDhj/eQ5zIhLoEMTGn363Q+53pwYYsV5aKQCT1CPSWk gX61UpBAb3Zh9nY0y0OPZqdOxRzM0wG4dRSZTkyYF5faxKV3XVlnI8tQyKIzoMa2a+d1 lgg48nEWq1Qtf8z/amHRBzNsYDJndCqFlYSCE6hUK2H6BDw+8IyS6Qu26Rb9C0J++Inn 1aBd7lp/bRxVNnKg5dauFACGPvEmF8xjTo/4+qH5Gkfd1ySA/3PjPL0YyHwjg2YQPMpo qAWg== 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-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 t11si8910759plo.293.2019.02.07.04.58.23; Thu, 07 Feb 2019 04:58:38 -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=UW7wDvRV; 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 S1727513AbfBGM5m (ORCPT + 99 others); Thu, 7 Feb 2019 07:57:42 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:44427 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727503AbfBGM5l (ORCPT ); Thu, 7 Feb 2019 07:57:41 -0500 Received: by mail-pf1-f195.google.com with SMTP id u6so4722153pfh.11 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=ec99qrLQXjnfojqCwGl2sLDE7HnN9qM6aD87ezUwDuGxt7Wtsg6ie7vHt8aRtZolsE Fb4J+EWtI0SBpQbc1bBts1qiDbPHiOTmLQIL15+oNnQQXZ8DsAsksKrn4YveOXGmHX4U NT7/FJ7IqMSeX2NS09gUdo2MdxU8nzCRcAseX7qiTUONIugO0UjffY9S1jXsjoLZomQg Umrj0Y9L5emM/HC+I27WlN1w/syRBl1KPj5e2WtnYBVmQ0E4VlHllqI3cUaWQNQDiWrU R6UOwj63XElHZ4KG1I7JSsKn90R6X+YqBDa8muis3EJhCNw/Sii+RVy1rBI7MmKeWJJd ywRA== X-Gm-Message-State: AHQUAuZpunbbHDkg4iy07t9k/JLrVAB6eRLlDC0Hq/6eV7nPO5T+5JGA Ut1WBH3t9wOuy4A4XT7goxvwygDyHpU= 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-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(-) 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 -- 2.17.1