ARM: tegra: thermal: Removed int sensor register
Joshua Primero [Tue, 28 Aug 2012 21:42:40 +0000 (14:42 -0700)]
Internal nct sensor registration to framework now
occurs at the driver level.

Change-Id: I224b08aba95061c67c2c06672aa95878a0ec41a1
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/132880
(cherry picked from commit deaf3ee7f0be288120a74c25cf4dba65cff02c38)
Signed-off-by: Gaurav Batra <gbatra@nvidia.com>
Reviewed-on: http://git-master/r/130286
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>

arch/arm/mach-tegra/board-cardhu-sensors.c
include/linux/nct1008.h

index 246d7b5..b08d04d 100644 (file)
@@ -765,14 +765,6 @@ static int nct_set_alert(void *_data,
        return nct1008_thermal_set_alert(data, alert_func, alert_data);
 }
 
-#ifdef CONFIG_TEGRA_SKIN_THROTTLE
-static int nct_get_itemp(void *dev_data, long *temp)
-{
-       struct nct1008_data *data = dev_data;
-       return nct1008_thermal_get_temps(data, NULL, temp);
-}
-#endif
-
 static void nct1008_probe_callback(struct nct1008_data *data)
 {
        struct tegra_thermal_device *ext_nct;
@@ -792,26 +784,6 @@ static void nct1008_probe_callback(struct nct1008_data *data)
        ext_nct->set_alert = nct_set_alert;
 
        tegra_thermal_device_register(ext_nct);
-
-#ifdef CONFIG_TEGRA_SKIN_THROTTLE
-       {
-               struct tegra_thermal_device *int_nct;
-               int_nct = kzalloc(sizeof(struct tegra_thermal_device),
-                                               GFP_KERNEL);
-               if (!int_nct) {
-                       kfree(int_nct);
-                       pr_err("unable to allocate thermal device\n");
-                       return;
-               }
-
-               int_nct->name = "nct_int";
-               int_nct->id = THERMAL_DEVICE_ID_NCT_INT;
-               int_nct->data = data;
-               int_nct->get_temp = nct_get_itemp;
-
-               tegra_thermal_device_register(int_nct);
-       }
-#endif
 }
 
 static struct nct1008_platform_data cardhu_nct1008_pdata = {
@@ -819,6 +791,8 @@ static struct nct1008_platform_data cardhu_nct1008_pdata = {
        .ext_range = true,
        .conv_rate = 0x08,
        .offset = 8, /* 4 * 2C. Bug 844025 - 1C for device accuracies */
+       .shutdown_ext_limit = 90,
+       .shutdown_local_limit = 100,
        .probe_callback = nct1008_probe_callback,
 };
 
index e64793f..244b26f 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <linux/types.h>
 #include <linux/workqueue.h>
+#include <linux/thermal.h>
 
 #include <mach/edp.h>