arm: tegra: power: Removed unnecessary nct code
Joshua Primero [Tue, 18 Oct 2011 23:09:25 +0000 (16:09 -0700)]
Having moved a lot of thermal functionality out of
the nct1008 driver, cleaned up all the unnecessary
code.

Reviewed-on: http://git-master/r/58849
Reviewed-on: http://git-master/r/63340
(cherry picked from commit eeee660eea54ddf76881587246bb9c59c6f0ad07)

Change-Id: I39ed5683ddc5df068e11d21680863f9ba979f862
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/66553
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

Rebase-Id: R77ff7022e05176f1b3caca0a18b79c074d10ad7b

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

index c512821..5872095 100644 (file)
@@ -626,12 +626,7 @@ static struct nct1008_platform_data cardhu_nct1008_pdata = {
        .supported_hwrev = true,
        .ext_range = true,
        .conv_rate = 0x08,
-       .hysteresis = 5,
        .offset = 8, /* 4 * 2C. Bug 844025 - 1C for device accuracies */
-       .shutdown_ext_limit = 90,
-       .shutdown_local_limit = 90,
-       .throttling_ext_limit = 85,
-       .alarm_fn = tegra_throttling_enable,
 #ifndef CONFIG_TEGRA_INTERNAL_TSENSOR_EDP_SUPPORT
        .probe_callback = nct1008_probe_callback,
 #endif
@@ -655,12 +650,6 @@ static int cardhu_nct1008_init(void)
 {
        int nct1008_port = -1;
        int ret;
-#ifdef CONFIG_TEGRA_EDP_LIMITS
-       const struct tegra_edp_limits *z;
-       int zones_sz;
-       int i;
-       bool throttle_ok = false;
-#endif
 
        if ((board_info.board_id == BOARD_E1198) ||
                (board_info.board_id == BOARD_E1291) ||
@@ -691,27 +680,6 @@ static int cardhu_nct1008_init(void)
                        tegra_gpio_enable(nct1008_port);
        }
 
-#ifdef CONFIG_TEGRA_EDP_LIMITS
-       tegra_get_cpu_edp_limits(&z, &zones_sz);
-       zones_sz = min(zones_sz, MAX_ZONES);
-       for (i = 0; i < zones_sz; i++) {
-               cardhu_nct1008_pdata.thermal_zones[i] = z[i].temperature;
-               if (cardhu_nct1008_pdata.thermal_zones[i] ==
-                   cardhu_nct1008_pdata.throttling_ext_limit) {
-                       throttle_ok = true;
-               }
-       }
-
-       if (throttle_ok != true)
-               pr_warn("%s: WARNING! Throttling limit %dC would be inaccurate"
-                       " as it is NOT one of the EDP points\n",
-                       __func__, cardhu_nct1008_pdata.throttling_ext_limit);
-       else
-               pr_info("%s: Throttling limit %dC OK\n",
-                       __func__, cardhu_nct1008_pdata.throttling_ext_limit);
-
-       cardhu_nct1008_pdata.thermal_zones_sz = zones_sz;
-#endif
        return ret;
 }