ARM: tegra: cardhu: switch off PMU at high temperature
venu byravarasu [Wed, 3 Aug 2011 11:21:57 +0000 (16:21 +0530)]
Add board support needed for PMU switch off when tsensor
detects temperature > TH3 threshold set.

bug 850047

Original-Change-Id: I7a283cedc735264dd8ea52801f7f1a103e9293cb
Reviewed-on: http://git-master/r/41531
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R6dbc2c1acb741666f6d7dda88f1bbb26c465717c

arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-cardhu.h

index bab3e72..319b9b1 100644 (file)
@@ -33,6 +33,7 @@
 #include <mach/irqs.h>
 #include <mach/pinmux.h>
 #include <mach/edp.h>
+#include <mach/tsensor.h>
 
 #include "gpio-names.h"
 #include "board.h"
@@ -994,6 +995,22 @@ int __init cardhu_power_off_init(void)
        return 0;
 }
 
+static struct tegra_tsensor_pmu_data  tpdata = {
+       .poweroff_reg_addr = 0x3F,
+       .poweroff_reg_data = 0x80,
+       .reset_tegra = 1,
+       .controller_type = 0,
+       .i2c_controller_id = 4,
+       .pinmux = 0,
+       .pmu_16bit_ops = 0,
+       .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 09e9f96..c468415 100644 (file)
@@ -739,7 +739,7 @@ static void __init tegra_cardhu_init(void)
        cardhu_edp_init();
 #endif
        cardhu_uart_init();
-       tegra_tsensor_init();
+       cardhu_tsensor_init();
        platform_add_devices(cardhu_devices, ARRAY_SIZE(cardhu_devices));
        cardhu_sdhci_init();
        cardhu_regulator_init();
index 01a29c5..711fadb 100644 (file)
@@ -170,6 +170,7 @@ int cardhu_emc_init(void);
 int cardhu_power_off_init(void);
 int cardhu_edp_init(void);
 int cardhu_pmon_init(void);
+void __init cardhu_tsensor_init(void);
 
 /* Baseband GPIO addresses */
 #define BB_GPIO_BB_EN                  TEGRA_GPIO_PR5