summaryrefslogtreecommitdiff
path: root/patches.tizen/0985-thermal-ti-soc-thermal-Ensure-to-compute-thermal-tre.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.tizen/0985-thermal-ti-soc-thermal-Ensure-to-compute-thermal-tre.patch')
-rw-r--r--patches.tizen/0985-thermal-ti-soc-thermal-Ensure-to-compute-thermal-tre.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/patches.tizen/0985-thermal-ti-soc-thermal-Ensure-to-compute-thermal-tre.patch b/patches.tizen/0985-thermal-ti-soc-thermal-Ensure-to-compute-thermal-tre.patch
new file mode 100644
index 00000000000..5ecd28012df
--- /dev/null
+++ b/patches.tizen/0985-thermal-ti-soc-thermal-Ensure-to-compute-thermal-tre.patch
@@ -0,0 +1,39 @@
+From 4bbc95bbaa8be3651ba9c15309a2e6b2dd9b6b2f Mon Sep 17 00:00:00 2001
+From: Ranganath Krishnan <ranganath@ti.com>
+Date: Fri, 23 Aug 2013 11:08:23 -0500
+Subject: [PATCH 0985/1302] thermal: ti-soc-thermal: Ensure to compute thermal
+ trend
+
+Workaround to compute thermal trend even when update interval
+is not set. This patch will ensure to compute the thermal trend
+when bandgap counter delay is not set.
+
+Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
+Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
+Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
+---
+ drivers/thermal/ti-soc-thermal/ti-bandgap.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+index 9dfd471..74c0e34 100644
+--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
++++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+@@ -1020,9 +1020,13 @@ int ti_bandgap_get_trend(struct ti_bandgap *bgp, int id, int *trend)
+
+ /* Fetch the update interval */
+ ret = ti_bandgap_read_update_interval(bgp, id, &interval);
+- if (ret || !interval)
++ if (ret)
+ goto unfreeze;
+
++ /* Set the interval to 1 ms if bandgap counter delay is not set */
++ if (interval == 0)
++ interval = 1;
++
+ *trend = (t1 - t2) / interval;
+
+ dev_dbg(bgp->dev, "The temperatures are t1 = %d and t2 = %d and trend =%d\n",
+--
+1.8.3.2
+