[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-449-ga2385a6
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-07-16 14:50:08
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via a2385a6675d94f8f7e89f36292534c9a2512c426 (commit)
from f5584f29212053a9c521c50906ec8f5643201d3e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a2385a6675d94f8f7e89f36292534c9a2512c426
Author: Eric Jarrige <eri...@ar...>
Date: Mon Jul 16 16:52:18 2012 +0200
[LINUX] apf28: enable mx28 wakeup through GPIO irq - enable user button wakeup behavior
-----------------------------------------------------------------------
Summary of changes:
...1-armadeus-add_apf28dev_baseboard_support.patch | 2 +-
.../2.6.35/458-armadeus-gpio_set_wake_irq.patch | 71 ++++++++++++++++++++
2 files changed, 72 insertions(+), 1 deletions(-)
create mode 100644 patches/linux/2.6.35/458-armadeus-gpio_set_wake_irq.patch
diff --git a/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch b/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
index b3e3b75..16cafcd 100644
--- a/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
+++ b/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
@@ -768,7 +768,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ .gpio = MXS_PIN_TO_GPIO(PINID_GPMI_CE1N), /* GPIO number */
+ .active_low = 1,
+ .desc = "user", /* Button description*/
-+ .wakeup = 0, /* no wakeup possible with this button */
++ .wakeup = 1,
+ },
+};
+
diff --git a/patches/linux/2.6.35/458-armadeus-gpio_set_wake_irq.patch b/patches/linux/2.6.35/458-armadeus-gpio_set_wake_irq.patch
new file mode 100644
index 0000000..c63b8ab
--- /dev/null
+++ b/patches/linux/2.6.35/458-armadeus-gpio_set_wake_irq.patch
@@ -0,0 +1,71 @@
+Enable mx28 GPIO pins to support system wakeup.
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+---
+Index: linux-2.6.35.3/arch/arm/plat-mxs/gpio.c
+===================================================================
+--- linux-2.6.35.3/arch/arm/plat-mxs/gpio.c
++++ linux-2.6.35.3/arch/arm/plat-mxs/gpio.c
+@@ -22,6 +22,7 @@
+ #include <linux/string.h>
+ #include <linux/gpio.h>
+ #include <linux/list.h>
++#include <linux/interrupt.h>
+ #include <linux/irq.h>
+
+ #include <mach/hardware.h>
+@@ -166,7 +167,8 @@ static void mxs_gpio_mask_irq(unsigned i
+ port = mxs_gpios[GPIO_TO_BANK(gpio)];
+ if (port->child_irq < 0)
+ return;
+- port->chip->mask_irq(port, GPIO_TO_PINS(gpio));
++ if (!(port->suspend_wakeup & (1 << gpio)))
++ port->chip->mask_irq(port, GPIO_TO_PINS(gpio));
+ }
+
+ static void mxs_gpio_unmask_irq(unsigned int irq)
+@@ -179,6 +181,24 @@ static void mxs_gpio_unmask_irq(unsigned
+ port->chip->unmask_irq(port, GPIO_TO_PINS(gpio));
+ }
+
++static int mxs_gpio_set_wake_irq(u32 irq, u32 enable)
++{
++ struct mxs_gpio_port *port;
++ unsigned int gpio = irq_to_gpio(irq);
++ port = mxs_gpios[GPIO_TO_BANK(gpio)];
++ if (port->child_irq < 0)
++ return -EINVAL;
++
++ if (enable) {
++ port->suspend_wakeup |= (1 << gpio);
++ enable_irq_wake(port->irq);
++ } else {
++ port->suspend_wakeup &= ~(1 << gpio);
++ disable_irq_wake(port->irq);
++ }
++ return 0;
++}
++
+ static struct irq_chip gpio_irq_chip = {
+ .ack = mxs_gpio_ack_irq,
+ .mask = mxs_gpio_mask_irq,
+@@ -186,6 +206,7 @@ static struct irq_chip gpio_irq_chip = {
+ .enable = mxs_gpio_unmask_irq,
+ .disable = mxs_gpio_mask_irq,
+ .set_type = mxs_gpio_set_irq_type,
++ .set_wake = mxs_gpio_set_wake_irq,
+ };
+
+ int __init mxs_add_gpio_port(struct mxs_gpio_port *port)
+Index: linux-2.6.35.3/arch/arm/plat-mxs/include/mach/gpio.h
+===================================================================
+--- linux-2.6.35.3/arch/arm/plat-mxs/include/mach/gpio.h
++++ linux-2.6.35.3/arch/arm/plat-mxs/include/mach/gpio.h
+@@ -51,6 +51,7 @@ struct mxs_gpio_port {
+ struct mxs_gpio_chip *chip;
+ struct gpio_chip port;
+ u32 both_edges;
++ u32 suspend_wakeup;
+ };
+
+ extern int mxs_add_gpio_port(struct mxs_gpio_port *port);
hooks/post-receive
--
armadeus
|