Hi!

Okay, maybe this is better fix for the regression?

Simplify irq wakeup code, and fix ugly warning during resume on spitz
as a result.

Signed-off-by: Pavel Machek <pa...@ucw.cz>

--- ./drivers/input/keyboard/pxa27x_keypad.c    2010-04-15 07:50:34.000000000 
+0200
+++ ./drivers/input/keyboard/pxa27x_keypad.c    2010-04-27 15:38:02.000000000 
+0200
@@ -33,6 +33,8 @@
 
 #include <mach/hardware.h>
 #include <mach/pxa27x_keypad.h>
+#include <mach/mfp-pxa2xx.h>
+
 /*
  * Keypad Controller registers
  */
@@ -412,7 +416,7 @@
        clk_disable(keypad->clk);
 
        if (device_may_wakeup(&pdev->dev))
-               enable_irq_wake(keypad->irq);
+               keypad_set_wake(1);
 
        return 0;
 }
@@ -424,7 +428,7 @@
        struct input_dev *input_dev = keypad->input_dev;
 
        if (device_may_wakeup(&pdev->dev))
-               disable_irq_wake(keypad->irq);
+               keypad_set_wake(0);
 
        mutex_lock(&input_dev->mutex);
 
--- ./arch/arm/mach-pxa/mfp-pxa2xx.c    2009-09-10 00:13:59.000000000 +0200
+++ ./arch/arm/mach-pxa/mfp-pxa2xx.c    2010-04-27 15:22:42.000000000 +0200
@@ -34,7 +34,6 @@
 struct gpio_desc {
        unsigned        valid           : 1;
        unsigned        can_wakeup      : 1;
-       unsigned        keypad_gpio     : 1;
        unsigned        dir_inverted    : 1;
        unsigned int    mask; /* bit mask in PWER or PKWR */
        unsigned int    mux_mask; /* bit mask of muxed gpio bits, 0 if no mux */
@@ -178,9 +177,6 @@
        if (!d->valid)
                return -EINVAL;
 
-       if (d->keypad_gpio)
-               return -EINVAL;
-
        mux_taken = (PWER & d->mux_mask) & (~d->mask);
        if (on && mux_taken)
                return -EBUSY;
@@ -291,7 +288,6 @@
        for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
                gpio = pxa27x_pkwr_gpio[i];
                gpio_desc[gpio].can_wakeup = 1;
-               gpio_desc[gpio].keypad_gpio = 1;
                gpio_desc[gpio].mask = 1 << i;
        }
 
--- ./arch/arm/mach-pxa/pxa27x.c        2010-03-21 22:09:12.000000000 +0100
+++ ./arch/arm/mach-pxa/pxa27x.c        2010-04-27 07:43:30.000000000 +0200
@@ -342,9 +342,6 @@
        if (gpio >= 0 && gpio < 128)
                return gpio_set_wake(gpio, on);
 
-       if (irq == IRQ_KEYPAD)
-               return keypad_set_wake(on);
-
        switch (irq) {
        case IRQ_RTCAlrm:
                mask = PWER_RTC;


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

_______________________________________________
Zaurus-devel mailing list
Zaurus-devel@lists.linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/zaurus-devel

Reply via email to