gpio: tegra: disable non-wake source interrupts
Bitan Biswas [Fri, 13 Jul 2012 10:29:37 +0000 (15:29 +0530)]
Gpio interrupts for non-wake sources are disabled before suspend

bug 904746

Change-Id: I21f3e5798055cbae7324b1571291eab4538e256f
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/115654
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

drivers/gpio/gpio-tegra.c

index 49abdf0..63af4ea 100644 (file)
@@ -6,7 +6,7 @@
  * Author:
  *     Erik Gilling <konkers@google.com>
  *
- * Copyright (c) 2011 NVIDIA Corporation.
+ * Copyright (c) 2011-2012, NVIDIA CORPORATION.  All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -390,6 +390,9 @@ static int tegra_gpio_suspend(void)
                        bank->oe[p] = __raw_readl(GPIO_OE(gpio));
                        bank->int_enb[p] = __raw_readl(GPIO_INT_ENB(gpio));
                        bank->int_lvl[p] = __raw_readl(GPIO_INT_LVL(gpio));
+
+                       /* disable gpio interrupts that are not wake sources */
+                       __raw_writel(bank->wake_enb[p], GPIO_INT_ENB(gpio));
                }
        }
        local_irq_restore(flags);