ARM: Tegra: add support to disable wakeup source
Varun Wadekar [Tue, 31 Jul 2012 10:13:47 +0000 (15:13 +0530)]
Original commit: http://git-master/r/103140

Change-Id: Id214fd9bdc1e05de6544db75e75f77535912a403
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/119639
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

arch/arm/mach-tegra/pm-irq.h
arch/arm/mach-tegra/wakeups-t2.c
arch/arm/mach-tegra/wakeups-t3.c

index de049eb..a2c8fcf 100644 (file)
@@ -25,6 +25,7 @@ bool tegra_pm_irq_lp0_allowed(void);
 int tegra_gpio_to_wake(int gpio);
 int tegra_irq_to_wake(int irq);
 int tegra_wake_to_irq(int wake);
+int tegra_disable_wake_source(int wake);
 #else
 static inline int tegra_pm_irq_set_wake_type(int wake, int flow_type)
 {
@@ -38,5 +39,9 @@ static inline int tegra_irq_to_wake(int irq)
 {
        return 0;
 }
+static inline int tegra_disable_wake_source(int wake)
+{
+       return 0;
+}
 #endif
 #endif
index e5267b6..94de69c 100644 (file)
@@ -162,3 +162,12 @@ int tegra_wake_to_irq(int wake)
 
        return ret;
 }
+
+int tegra_disable_wake_source(int wake)
+{
+       if (wake >= ARRAY_SIZE(tegra_wake_event_irq))
+               return -EINVAL;
+
+       tegra_wake_event_irq[wake] = -EINVAL;
+       return 0;
+}
index 997de23..36b194a 100644 (file)
@@ -182,3 +182,12 @@ int tegra_wake_to_irq(int wake)
 
        return ret;
 }
+
+int tegra_disable_wake_source(int wake)
+{
+       if (wake >= ARRAY_SIZE(tegra_wake_event_irq))
+               return -EINVAL;
+
+       tegra_wake_event_irq[wake] = -EINVAL;
+       return 0;
+}