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>
This commit is contained in:
Keerthy 2017-03-09 13:36:00 +05:30 committed by Eduardo Valentin
parent c1ae3cfa0e
commit e7d22fd2f6
1 changed files with 2 additions and 2 deletions

View File

@ -96,8 +96,8 @@ static inline int __ti_thermal_get_temp(void *devdata, int *temp)
return ret; return ret;
/* Default constants */ /* Default constants */
slope = s->slope; slope = thermal_zone_get_slope(data->ti_thermal);
constant = s->constant; constant = thermal_zone_get_offset(data->ti_thermal);
pcb_tz = data->pcb_tz; pcb_tz = data->pcb_tz;
/* In case pcb zone is available, use the extrapolation rule with it */ /* In case pcb zone is available, use the extrapolation rule with it */