From: Keerthy <j-keerthy@ti.com>
To: <tony@atomide.com>, <edubezval@gmail.com>
Cc: <rui.zhang@intel.com>, <linux-omap@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>,
<robh+dt@kernel.org>, <t-kristo@ti.com>, <j-keerthy@ti.com>
Subject: [PATCH v2 6/8] thermal: ti-soc-thermal: Fetch slope and offset from DT
Date: Thu, 9 Mar 2017 13:36:00 +0530 [thread overview]
Message-ID: <1489046762-11288-7-git-send-email-j-keerthy@ti.com> (raw)
In-Reply-To: <1489046762-11288-1-git-send-email-j-keerthy@ti.com>
Currently slope and offset values for calculating the hot spot
temperature of a thermal zone is being taken directly from driver
data. So fetch them from device tree.
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 0586bd0..2054a5c 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -96,8 +96,8 @@ static inline int __ti_thermal_get_temp(void *devdata, int *temp)
return ret;
/* Default constants */
- slope = s->slope;
- constant = s->constant;
+ slope = thermal_zone_get_slope(data->ti_thermal);
+ constant = thermal_zone_get_offset(data->ti_thermal);
pcb_tz = data->pcb_tz;
/* In case pcb zone is available, use the extrapolation rule with it */
--
1.9.1
next prev parent reply other threads:[~2017-03-09 8:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 8:05 [PATCH v2 0/8] thermal: ti-soc-thermal: Migrate slope/offset data to device tree Keerthy
2017-03-09 8:05 ` [PATCH v2 1/8] arm: dts: omap3: Add cpu_thermal zone Keerthy
2017-03-09 8:05 ` [PATCH v2 2/8] ARM: DRA7: Thermal: Add slope and offset values Keerthy
2017-03-09 8:05 ` [PATCH v2 3/8] ARM: OMAP5: " Keerthy
2017-03-29 4:33 ` Eduardo Valentin
2017-03-30 3:27 ` Keerthy
2017-03-09 8:05 ` [PATCH v2 4/8] ARM: OMAP443x: " Keerthy
2017-03-09 8:05 ` [PATCH v2 5/8] ARM: OMAP4460: " Keerthy
2017-03-09 8:06 ` Keerthy [this message]
2017-03-09 8:06 ` [PATCH v2 7/8] thermal: ti-soc-thermal: Remove redundant constants Keerthy
2017-03-09 8:06 ` [PATCH v2 8/8] thermal: ti-soc-thermal: Remove redundant code Keerthy
2017-03-22 3:42 ` [PATCH v2 0/8] thermal: ti-soc-thermal: Migrate slope/offset data to device tree Keerthy
2017-03-23 20:52 ` Tony Lindgren
2017-03-24 3:26 ` Keerthy
2017-03-24 14:26 ` Tony Lindgren
2017-03-29 4:37 ` Eduardo Valentin
2017-03-30 3:29 ` Keerthy
2017-03-30 4:46 ` Eduardo Valentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489046762-11288-7-git-send-email-j-keerthy@ti.com \
--to=j-keerthy@ti.com \
--cc=edubezval@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=t-kristo@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).