提交 e838ff81 编写于 作者: R Ranganath Krishnan 提交者: Eduardo Valentin

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: NRanganath Krishnan <ranganath@ti.com>
Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com>
上级 10ccff1b
...@@ -1020,9 +1020,13 @@ int ti_bandgap_get_trend(struct ti_bandgap *bgp, int id, int *trend) ...@@ -1020,9 +1020,13 @@ int ti_bandgap_get_trend(struct ti_bandgap *bgp, int id, int *trend)
/* Fetch the update interval */ /* Fetch the update interval */
ret = ti_bandgap_read_update_interval(bgp, id, &interval); ret = ti_bandgap_read_update_interval(bgp, id, &interval);
if (ret || !interval) if (ret)
goto unfreeze; goto unfreeze;
/* Set the interval to 1 ms if bandgap counter delay is not set */
if (interval == 0)
interval = 1;
*trend = (t1 - t2) / interval; *trend = (t1 - t2) / interval;
dev_dbg(bgp->dev, "The temperatures are t1 = %d and t2 = %d and trend =%d\n", dev_dbg(bgp->dev, "The temperatures are t1 = %d and t2 = %d and trend =%d\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部