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>

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

index 1177d4b..41a5707 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;
 }
 
index a0583e9..f6149a3 100644 (file)
@@ -108,12 +108,7 @@ static struct nct1008_platform_data enterprise_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
@@ -130,12 +125,6 @@ static struct i2c_board_info enterprise_i2c4_nct1008_board_info[] = {
 static void enterprise_nct1008_init(void)
 {
        int ret;
-#ifdef CONFIG_TEGRA_EDP_LIMITS
-       const struct tegra_edp_limits *z;
-       int zones_sz;
-       int i;
-       bool throttle_ok = false;
-#endif
 
        tegra_gpio_enable(TEGRA_GPIO_PH7);
        ret = gpio_request(TEGRA_GPIO_PH7, "temp_alert");
@@ -153,27 +142,6 @@ static void enterprise_nct1008_init(void)
 
        i2c_register_board_info(4, enterprise_i2c4_nct1008_board_info,
                                ARRAY_SIZE(enterprise_i2c4_nct1008_board_info));
-#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++) {
-               enterprise_nct1008_pdata.thermal_zones[i] = z[i].temperature;
-               if (enterprise_nct1008_pdata.thermal_zones[i] ==
-                   enterprise_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__, enterprise_nct1008_pdata.throttling_ext_limit);
-       else
-               pr_info("%s: Throttling limit %dC OK\n",
-                       __func__, enterprise_nct1008_pdata.throttling_ext_limit);
-
-       enterprise_nct1008_pdata.thermal_zones_sz = zones_sz;
-#endif
 }
 
 #define SENSOR_MPU_NAME "mpu3050"