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: 10801099 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 6385F6C2 for ; Thu, 7 Feb 2019 12:57:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52C5A2D3F2 for ; Thu, 7 Feb 2019 12:57:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46C782D40F; Thu, 7 Feb 2019 12:57:43 +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 DF45C2D3F2 for ; Thu, 7 Feb 2019 12:57:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727508AbfBGM5m (ORCPT ); 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-Google-Smtp-Source: AHgI3IZvISlmMUv7DspDKGkXf1feo036TwXlnaWiK9ISg9Zs3+bx/pBHTqs4tagAOSn1rvjMECidFA== 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 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 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