From: Pavel Machek <pavel@ucw.cz>
To: Eric Miao <eric.y.miao@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>, "Rafael J. Wysocki" <rjw@sisk.pl>,
thommycheck@gmail.com, dbaryshkov@gmail.com, dtor@mail.ru,
arminlitzel@web.de, kernel list <linux-kernel@vger.kernel.org>,
Cyril Hrubis <metan@ucw.cz>,
Dirk@opfer-online.de, utx@penguin.cz, lenz@cs.wisc.edu,
rpurdie@rpsys.net, omegamoon@gmail.com,
linux-input@vger.kernel.org, zaurus-devel@lists.linuxtogo.org,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1
Date: Thu, 29 Apr 2010 15:08:52 +0200 [thread overview]
Message-ID: <20100429130852.GC1661@ucw.cz> (raw)
In-Reply-To: <f17812d71003072135wcc7165m31a302b7da75c36e@mail.gmail.com>
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 <pavel@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
prev parent reply other threads:[~2010-04-29 13:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100106071026.GD1382@ucw.cz>
[not found] ` <f17812d71001052317h2bf25fady6bd729b35ef6db63@mail.gmail.com>
2010-01-07 6:52 ` sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1 Pavel Machek
2010-01-07 7:33 ` Eric Miao
[not found] ` <f17812d71001062333y2e49fa21scf91718da9ae3091-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-23 19:41 ` Stanislav Brabec
2010-01-23 22:43 ` gpio_keys and how PXA27x sets gpio_set_wake() (was Re: sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1) Stanislav Brabec
[not found] ` <1264286611.11766.49.camel-VKpoJ9vcIcXrBKCeMvbIDA@public.gmane.org>
2010-01-26 3:58 ` Eric Miao
2010-01-26 10:13 ` Stanislav Brabec
[not found] ` <1264500824.4480.79.camel-VKpoJ9vcIcXrBKCeMvbIDA@public.gmane.org>
2010-01-26 10:20 ` Eric Miao
[not found] ` <f17812d71001260220v5d03b0e1u1e3bc229827c37c8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-26 10:44 ` Stanislav Brabec
2010-01-26 11:23 ` Dmitry Eremin-Solenikov
[not found] ` <1264502668.4480.97.camel-VKpoJ9vcIcXrBKCeMvbIDA@public.gmane.org>
2010-01-26 11:39 ` Eric Miao
2010-01-26 12:50 ` Stanislav Brabec
2010-03-05 9:23 ` sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1 Pavel Machek
2010-03-08 5:35 ` Eric Miao
2010-04-29 13:08 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100429130852.GC1661@ucw.cz \
--to=pavel@ucw.cz \
--cc=Dirk@opfer-online.de \
--cc=akpm@osdl.org \
--cc=arminlitzel@web.de \
--cc=dbaryshkov@gmail.com \
--cc=dtor@mail.ru \
--cc=eric.y.miao@gmail.com \
--cc=lenz@cs.wisc.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metan@ucw.cz \
--cc=omegamoon@gmail.com \
--cc=rjw@sisk.pl \
--cc=rpurdie@rpsys.net \
--cc=thommycheck@gmail.com \
--cc=utx@penguin.cz \
--cc=zaurus-devel@lists.linuxtogo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).