]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[ARM] 4970/1: tosa: correct gpio used for wake up.
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Sat, 12 Apr 2008 19:02:50 +0000 (20:02 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 19 Apr 2008 10:29:08 +0000 (11:29 +0100)
TOSA_GPIO_ON_KEY can't wakeup the device. But the board
provides TOSA_GPIO_POWERON which is OR of (on_ac) and (on_button).
Use it for wake up.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/tosa.c

index df65e89d193444e011266b2f60ab7441d20cf896..9f5ca5497bb9277844f72cb032ff0151e48a2c37 100644 (file)
@@ -325,12 +325,28 @@ static struct platform_device tosakbd_device = {
 };
 
 static struct gpio_keys_button tosa_gpio_keys[] = {
+       /*
+        * Two following keys are directly tied to "ON" button of tosa. Why?
+        * The first one can be used as a wakeup source, the second can't;
+        * also the first one is OR of ac_powered and on_button.
+        */
+       {
+               .type   = EV_PWR,
+               .code   = KEY_RESERVED,
+               .gpio   = TOSA_GPIO_POWERON,
+               .desc   = "Poweron",
+               .wakeup = 1,
+               .active_low = 1,
+       },
        {
                .type   = EV_PWR,
                .code   = KEY_SUSPEND,
                .gpio   = TOSA_GPIO_ON_KEY,
                .desc   = "On key",
-               .wakeup = 1,
+               /*
+                * can't be used as wakeup
+                * .wakeup      = 1,
+                */
                .active_low = 1,
        },
        {