summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorKeerthy <j-keerthy@ti.com>2017-03-09 13:36:00 +0530
committerEduardo Valentin <edubezval@gmail.com>2017-03-29 22:14:28 -0700
commite7d22fd2f634d570ab036336c7a6e5017244d0e0 (patch)
treef3a9f1bcce9d1eeb14cc681532917d4059623f15 /drivers/thermal
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff)
downloadop-kernel-dev-e7d22fd2f634d570ab036336c7a6e5017244d0e0.zip
op-kernel-dev-e7d22fd2f634d570ab036336c7a6e5017244d0e0.tar.gz
thermal: ti-soc-thermal: Fetch slope and offset from DT
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> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-thermal-common.c4
1 files 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 */
OpenPOWER on IntegriCloud