summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra3_tsensor.c
diff options
context:
space:
mode:
authorJoshua Primero <jprimero@nvidia.com>2011-12-18 15:44:25 -0800
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-22 11:31:16 +0530
commit32ff2dc25622e3a0367326729c5b483c64ae2f29 (patch)
tree33418ae37cf65ee5138d2f83381ee93501bc1209 /arch/arm/mach-tegra/tegra3_tsensor.c
parent29a18b43d3bfeaf240094c54cb7946ba6b4975c0 (diff)
arm: tegra: thermal: Low temp to therm algorithm
Instead of using 0C as default low temp in thermal algorithm, query the thermal device driver for lowest supported temperature. Change-Id: Id1f70380ba476dec80e36ce79b42ab6f24a5d5ba Signed-off-by: Joshua Primero <jprimero@nvidia.com> Reviewed-on: http://git-master/r/70935 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra3_tsensor.c')
-rw-r--r--arch/arm/mach-tegra/tegra3_tsensor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra3_tsensor.c b/arch/arm/mach-tegra/tegra3_tsensor.c
index 9e027c8652b9..a19a99785ae7 100644
--- a/arch/arm/mach-tegra/tegra3_tsensor.c
+++ b/arch/arm/mach-tegra/tegra3_tsensor.c
@@ -62,6 +62,12 @@ static int tsensor_get_temp(void *vdata, long *milli_temp)
return tsensor_thermal_get_temp(data, milli_temp);
}
+static int tsensor_get_temp_low(void *vdata, long *milli_temp)
+{
+ struct tegra_tsensor_data *data = vdata;
+ return tsensor_thermal_get_temp_low(data, milli_temp);
+}
+
static int tsensor_set_limits(void *vdata,
long lo_limit_milli,
long hi_limit_milli)
@@ -102,6 +108,7 @@ static void tegra3_tsensor_probe_callback(struct tegra_tsensor_data *data)
thermal_device->data = data;
thermal_device->offset = TSENSOR_OFFSET;
thermal_device->get_temp = tsensor_get_temp;
+ thermal_device->get_temp_low = tsensor_get_temp_low;
thermal_device->set_limits = tsensor_set_limits;
thermal_device->set_alert = tsensor_set_alert;
thermal_device->set_shutdown_temp = tsensor_set_shutdown_temp;