summaryrefslogtreecommitdiff
path: root/target/linux/ipq806x/patches-4.9
diff options
context:
space:
mode:
authorPavel Kubelun <be.dissent@gmail.com>2017-03-24 16:12:40 +0300
committerJohn Crispin <john@phrozen.org>2017-03-27 08:05:10 +0200
commit9ac4c1dcee7ba101233ac03437382e0831b74577 (patch)
treea4925f9beec5f715bc700baefa3c515a9fa98b8b /target/linux/ipq806x/patches-4.9
parentdc32d0a53cc01d9f644c6e9851b6770440d4b28c (diff)
downloadmtk-20170518-9ac4c1dcee7ba101233ac03437382e0831b74577.zip
mtk-20170518-9ac4c1dcee7ba101233ac03437382e0831b74577.tar.gz
mtk-20170518-9ac4c1dcee7ba101233ac03437382e0831b74577.tar.bz2
ipq806x: tsens: convert degrees to millicelsius
Current driver shows temp in full degrees while other apps await it to be in millidegrees. Initially the driver represents termal data in millidegrees but then it gets divided by TSENS_FACTOR. So lets just set it to '1'. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.9')
-rw-r--r--target/linux/ipq806x/patches-4.9/0063-1-ipq806x-tsens-driver.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ipq806x/patches-4.9/0063-1-ipq806x-tsens-driver.patch b/target/linux/ipq806x/patches-4.9/0063-1-ipq806x-tsens-driver.patch
index d8205c1..691f32c 100644
--- a/target/linux/ipq806x/patches-4.9/0063-1-ipq806x-tsens-driver.patch
+++ b/target/linux/ipq806x/patches-4.9/0063-1-ipq806x-tsens-driver.patch
@@ -109,7 +109,7 @@ index 0000000..c52888f
+
+#define THRESHOLD_ADDR 0x3624
+/* THRESHOLD_ADDR bitmasks */
-+#define THRESHOLD_MAX_CODE 0xff
++#define THRESHOLD_MAX_CODE 0x20000
+#define THRESHOLD_MIN_CODE 0
+#define THRESHOLD_MAX_LIMIT_SHIFT 24
+#define THRESHOLD_MIN_LIMIT_SHIFT 16
@@ -163,7 +163,7 @@ index 0000000..c52888f
+
+#define TSENS_8064_SEQ_SENSORS 5
+#define TSENS_8064_S4_S5_OFFSET 40
-+#define TSENS_FACTOR 1000
++#define TSENS_FACTOR 1
+
+/* Trips: from very hot to very cold */
+enum tsens_trip_type {