summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Nihalani <bnihalani@nvidia.com>2010-08-13 21:01:11 +0530
committerYu-Huan Hsu <yhsu@nvidia.com>2010-08-16 10:48:35 -0700
commitca47d2a962f17700a1b4d99dd290c8caa69f33d5 (patch)
treef05f5cf6961a9b466c84df15e9a574ea8bdc5256
parent522465251960937c589e79a25cdb3eb621a9280d (diff)
harmony odm: disable GPIO-PV2 as wake-up event
gpio_pv2 is disabled as a wake-up source for Harmony, as it causes spurious interrupts when battery charging current is more than 120 mA fix for bug 717868 Change-Id: I9b42b81daac035b0ba3644e8b23a1c1d6a5f03bb Reviewed-on: http://git-master.nvidia.com/r/5140 Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
-rwxr-xr-xarch/arm/mach-tegra/board-nvodm.c10
-rw-r--r--arch/arm/mach-tegra/odm_kit/query/harmony/nvodm_query_discovery.c3
2 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-nvodm.c b/arch/arm/mach-tegra/board-nvodm.c
index 60c8a36991ba..81fd9876d9d2 100755
--- a/arch/arm/mach-tegra/board-nvodm.c
+++ b/arch/arm/mach-tegra/board-nvodm.c
@@ -72,7 +72,7 @@
#include <linux/input.h>
#endif
-
+extern NvBool IsBoardTango(void);
NvRmGpioHandle s_hGpioGlobal;
struct debug_port_data {
@@ -1594,6 +1594,14 @@ static void __init tegra_setup_suspend(void)
while (nr_wake--) {
unsigned int pad = w->WakeupPadNumber;
+
+#ifdef CONFIG_TEGRA_BATTERY_NVEC
+ // pad 24 (gpio_pv2) on harmony should not be enabled as wake-up event
+ // as battery charging current causes spurious events on this line and
+ // thus causes un-expected wake-up from LP0
+ if ((pad == 24) && !IsBoardTango())
+ continue;
+#endif
if (pad < ARRAY_SIZE(wakepad_irq) && w->enable)
enable_irq_wake(wakepad_irq[pad]);
diff --git a/arch/arm/mach-tegra/odm_kit/query/harmony/nvodm_query_discovery.c b/arch/arm/mach-tegra/odm_kit/query/harmony/nvodm_query_discovery.c
index 47506c9e522a..b2763e013918 100644
--- a/arch/arm/mach-tegra/odm_kit/query/harmony/nvodm_query_discovery.c
+++ b/arch/arm/mach-tegra/odm_kit/query/harmony/nvodm_query_discovery.c
@@ -65,6 +65,7 @@ static NvOdmPeripheralConnectivity s_Peripherals_Default[] =
#define PROCESSOR_BOARD_ID_I2C_ADDRESS ((0x56)<<1)
#define PROCESSOR_BOARD_ID_I2C_SEGMENT (0x00)
+NvBool IsBoardTango(void);
// The following are used to store entries read from EEPROMs at runtime.
static NvOdmPeripheralConnectivity s_Peripherals[NVODM_QUERY_MAX_PERIPHERALS];
static NvOdmIoAddress s_Peripheral_IoAddresses[NVODM_QUERY_MAX_IO_ADDRESSES];
@@ -621,7 +622,7 @@ NvApGetAllPeripherals (NvU32 *pNum)
return (const NvOdmPeripheralConnectivity *)s_Peripherals;
}
-static NvBool IsBoardTango(void)
+NvBool IsBoardTango(void)
{
NvOdmBoardInfo BoardInfo;
static NvBool s_IsBoardIdRead = NV_FALSE;