summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04803f4)
raw | patch | inline | side by side (parent: 04803f4)
author | Ranganath Krishnan <ranganath@ti.com> | |
Tue, 20 Aug 2013 15:48:44 +0000 (10:48 -0500) | ||
committer | Gerrit Code Review <gerrit2@git.omapzoom.org> | |
Tue, 3 Sep 2013 21:05:38 +0000 (16:05 -0500) |
Workaround to compute thermal trend even when update interval
is not set. This patch will ensure to compute the trend when
bandgap counter delay is not set.
Change-Id: I68593c1155751833f4ee8792823db80c6d82a4ce
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
is not set. This patch will ensure to compute the trend when
bandgap counter delay is not set.
Change-Id: I68593c1155751833f4ee8792823db80c6d82a4ce
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
drivers/staging/ti-soc-thermal/ti-bandgap.c | patch | blob | history |
diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c
index 16dd07b6850a42ebf55ff51c565337a63114ca70..ed90b853ed442bfdf9bd505d5af93cd9707837b8 100644 (file)
/* Fetch the update interval */
ret = ti_bandgap_read_update_interval(bgp, id, &interval);
- if (ret || !interval)
+ if (ret)
goto exit;
+ /* 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",