arm: tegra: update thermal sensor configurations
Hao Tang [Thu, 16 Feb 2012 19:45:03 +0000 (11:45 -0800)]
Bug 941960

Removed CONFIG_TEGRA_INTERNAL_TSENSOR_EDP_SUPPORT.
Add internal tsensor on kai.

Change-Id: Iaefa43112fbbaa42d43a428ecb86ad821e683f85
Signed-off-by: Hao Tang <htang@nvidia.com>
Reviewed-on: http://git-master/r/84350
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

arch/arm/mach-tegra/Kconfig
arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-cardhu-sensors.c
arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-cardhu.h
arch/arm/mach-tegra/board-enterprise-power.c
arch/arm/mach-tegra/board-enterprise-sensors.c
arch/arm/mach-tegra/board-enterprise.c
arch/arm/mach-tegra/board-enterprise.h
arch/arm/mach-tegra/tegra3_tsensor.c

index 599c07f..455ba54 100644 (file)
@@ -377,13 +377,6 @@ config TEGRA_EDP_LIMITS
          of on-line CPUs to keep CPU rail current within power supply
          capabilities.
 
-config TEGRA_INTERNAL_TSENSOR_EDP_SUPPORT
-       bool "Enable EDP and thermal throttling using internal TSensor"
-       depends on TEGRA_EDP_LIMITS && ARCH_TEGRA_3x_SOC
-       help
-         When enabled, uses internal tsensor to support EDP and
-         thermal throttling on tegra platform
-
 config TEGRA_EMC_TO_DDR_CLOCK
        int "EMC to DDR clocks ratio"
        default "2" if ARCH_TEGRA_2x_SOC
index b3d9e22..01a98a5 100644 (file)
@@ -1192,11 +1192,6 @@ static struct tegra_tsensor_pmu_data  tpdata = {
        .pmu_i2c_addr = 0x2D,
 };
 
-void __init cardhu_tsensor_init(void)
-{
-       tegra3_tsensor_init(&tpdata);
-}
-
 #ifdef CONFIG_TEGRA_EDP_LIMITS
 
 int __init cardhu_edp_init(void)
index 0a4551f..46893ba 100644 (file)
@@ -567,7 +567,6 @@ static struct i2c_board_info cardhu_i2c8_board_info[] = {
        },
 };
 
-#ifndef CONFIG_TEGRA_INTERNAL_TSENSOR_EDP_SUPPORT
 static int nct_get_temp(void *_data, long *temp)
 {
        struct nct1008_data *data = _data;
@@ -626,16 +625,13 @@ static void nct1008_probe_callback(struct nct1008_data *data)
 
        tegra_thermal_set_device(thermal_device);
 }
-#endif
 
 static struct nct1008_platform_data cardhu_nct1008_pdata = {
        .supported_hwrev = true,
        .ext_range = true,
        .conv_rate = 0x08,
        .offset = 8, /* 4 * 2C. Bug 844025 - 1C for device accuracies */
-#ifndef CONFIG_TEGRA_INTERNAL_TSENSOR_EDP_SUPPORT
        .probe_callback = nct1008_probe_callback,
-#endif
 };
 
 static struct i2c_board_info cardhu_i2c4_bq27510_board_info[] = {
index 763e66a..6a0883c 100644 (file)
@@ -1126,7 +1126,6 @@ static void __init tegra_cardhu_init(void)
        cardhu_edp_init();
 #endif
        cardhu_uart_init();
-       cardhu_tsensor_init();
        platform_add_devices(cardhu_devices, ARRAY_SIZE(cardhu_devices));
        tegra_ram_console_debug_init();
        cardhu_sdhci_init();
index d48991a..bf76cc9 100644 (file)
@@ -213,7 +213,6 @@ int cardhu_pm298_gpio_switch_regulator_init(void);
 int cardhu_pm298_regulator_init(void);
 int cardhu_pm299_gpio_switch_regulator_init(void);
 int cardhu_pm299_regulator_init(void);
-void __init cardhu_tsensor_init(void);
 
 #define MPU_TYPE_MPU3050       1
 #define MPU_TYPE_MPU6050       2
index 69b24cc..f34ddea 100644 (file)
@@ -574,11 +574,6 @@ static int __init enterprise_regulators_fixed_gpio_init(void)
 }
 subsys_initcall_sync(enterprise_regulators_fixed_gpio_init);
 
-void __init enterprise_tsensor_init(void)
-{
-       tegra3_tsensor_init(NULL);
-}
-
 int __init enterprise_regulator_init(void)
 {
        void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
index f3060a5..f775c2b 100644 (file)
@@ -51,7 +51,6 @@
 #include "board-enterprise.h"
 #include "board.h"
 
-#ifndef CONFIG_TEGRA_INTERNAL_TSENSOR_EDP_SUPPORT
 static int nct_get_temp(void *_data, long *temp)
 {
        struct nct1008_data *data = _data;
@@ -111,16 +110,13 @@ static void nct1008_probe_callback(struct nct1008_data *data)
 
        tegra_thermal_set_device(thermal_device);
 }
-#endif
 
 static struct nct1008_platform_data enterprise_nct1008_pdata = {
        .supported_hwrev = true,
        .ext_range = true,
        .conv_rate = 0x08,
        .offset = 8, /* 4 * 2C. Bug 844025 - 1C for device accuracies */
-#ifndef CONFIG_TEGRA_INTERNAL_TSENSOR_EDP_SUPPORT
        .probe_callback = nct1008_probe_callback,
-#endif
 };
 
 static struct i2c_board_info enterprise_i2c4_nct1008_board_info[] = {
index e5b6aca..2418a6d 100644 (file)
@@ -926,7 +926,6 @@ static void __init tegra_enterprise_init(void)
        enterprise_i2c_init();
        enterprise_uart_init();
        enterprise_usb_init();
-       enterprise_tsensor_init();
        platform_add_devices(enterprise_devices, ARRAY_SIZE(enterprise_devices));
        tegra_ram_console_debug_init();
        enterprise_regulator_init();
index e6a0651..3d86fe6 100644 (file)
@@ -50,7 +50,6 @@ int enterprise_regulator_init(void);
 int enterprise_modem_init(void);
 int enterprise_suspend_init(void);
 int enterprise_edp_init(void);
-void __init enterprise_tsensor_init(void);
 void enterprise_bpc_mgmt_init(void);
 
 /* Invensense MPU Definitions */
index 32fe90b..01d3cd7 100644 (file)
@@ -57,7 +57,6 @@
 
 #define TSENSOR_OFFSET (4000 + 5000)
 
-#ifdef CONFIG_TEGRA_INTERNAL_TSENSOR_EDP_SUPPORT
 static int tsensor_get_temp(void *vdata, long *milli_temp)
 {
        struct tegra_tsensor_data *data = vdata;
@@ -186,8 +185,3 @@ labelSkipPowerOff:
 labelEnd:
        return;
 }
-#else
-void __init tegra3_tsensor_init(struct tegra_tsensor_pmu_data *data)
-{
-}
-#endif