summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/qcom/tsens.h
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@linaro.org>2019-03-20 14:18:03 +0100
committerEduardo Valentin <edubezval@gmail.com>2019-05-14 16:00:23 +0200
commite52bbd2f10adf708b8a706bc8b89fbad53445c79 (patch)
tree27cbd5f084d6843df8583e41959d5f993172642d /drivers/thermal/qcom/tsens.h
parentdrivers: thermal: tsens: Add generic support for TSENS v1 IP (diff)
downloadlinux-e52bbd2f10adf708b8a706bc8b89fbad53445c79.tar.xz
linux-e52bbd2f10adf708b8a706bc8b89fbad53445c79.zip
drivers: thermal: tsens: Move calibration constants to header file
This will allow calibration routines to correctly include the constants from anywhere and allow more code sharing. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/qcom/tsens.h')
-rw-r--r--drivers/thermal/qcom/tsens.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
index d648fba235cf..eefe3844fb4e 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 <linux/thermal.h>
#include <linux/regmap.h>