arm: tegra: thermal: Low temp to therm algorithm
Joshua Primero [Sun, 18 Dec 2011 23:44:25 +0000 (15:44 -0800)]
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>

Rebase-Id: Rcc43c0e15955ca7fe5fb1a504edaff29d6040372

arch/arm/mach-tegra/board-cardhu-sensors.c

index 54b9cdd..6acd642 100644 (file)
@@ -538,6 +538,12 @@ static int nct_get_temp(void *_data, long *temp)
        return nct1008_thermal_get_temp(data, temp);
 }
 
+static int nct_get_temp_low(void *_data, long *temp)
+{
+       struct nct1008_data *data = _data;
+       return nct1008_thermal_get_temp_low(data, temp);
+}
+
 static int nct_set_limits(void *_data,
                        long lo_limit_milli,
                        long hi_limit_milli)
@@ -561,6 +567,7 @@ static int nct_set_shutdown_temp(void *_data, long shutdown_temp)
        struct nct1008_data *data = _data;
        return nct1008_thermal_set_shutdown_temp(data, shutdown_temp);
 }
+
 static void nct1008_probe_callback(struct nct1008_data *data)
 {
        struct tegra_thermal_device *thermal_device;
@@ -576,6 +583,7 @@ static void nct1008_probe_callback(struct nct1008_data *data)
        thermal_device->data = data;
        thermal_device->offset = TDIODE_OFFSET;
        thermal_device->get_temp = nct_get_temp;
+       thermal_device->get_temp_low = nct_get_temp_low;
        thermal_device->set_limits = nct_set_limits;
        thermal_device->set_alert = nct_set_alert;
        thermal_device->set_shutdown_temp = nct_set_shutdown_temp;