From: Pavel Machek <pavel@ucw.cz>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>,
rpurdie@rpsys.net, lenz@cs.wisc.edu,
kernel list <linux-kernel@vger.kernel.org>,
Dirk@opfer-online.de, arminlitzel@web.de,
Cyril Hrubis <metan@ucw.cz>,
thommycheck@gmail.com,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
dbaryshkov@gmail.com, omegamoon@gmail.com, utx@penguin.cz,
linux-input@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: 32-rc1 aka 32-rc2: warning at manage.c:361 (set_irq_wake), matrix-keypad related?
Date: Sat, 2 Jan 2010 16:27:24 +0100 [thread overview]
Message-ID: <20100102152723.GA10476@ucw.cz> (raw)
In-Reply-To: <20100102135608.GA5872@ucw.cz>
On Sat 2010-01-02 14:56:09, Pavel Machek wrote:
> Hi!
>
> > > > We ignore the failure right now in the mainline but that causes stack
> > > > traces on resume as we trying to disable not enabled wakeup GPIOs. That
> > > > was original Pavel's complaint.
> > >
> > > Yep...
> > >
> > > I'd say that BUG() simply should not trigger if wakeup can not be
> > > enabled/disabled for particular source...?
> >
> > Pavel,
> >
> > Could you please try the patch below and let me know if it fixes the
> > problem for you?
>
> (sorry for long delay).
>
> With 33-rc1+your patch, warnings are no longer there.
>
> I still have one on irq191, but that's gpio button driver.
>
> But please, hold the patch for few more days. I may have cleaner/nicer
> solution. It seems that zaurus is doing something very stupid in low
> layers.
I'm thinking that maybe something like this should do the trick.
--- ./arch/arm.ofic/mach-pxa/mfp-pxa2xx.c 2009-09-10 00:13:59.000000000 +0200
+++ ./arch/arm/mach-pxa/mfp-pxa2xx.c 2009-12-29 03:16:40.000000000 +0100
@@ -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;
@@ -231,32 +227,6 @@
#endif /* CONFIG_PXA25x */
#ifdef CONFIG_PXA27x
-static int pxa27x_pkwr_gpio[] = {
- 13, 16, 17, 34, 36, 37, 38, 39, 90, 91, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102
-};
-
-int keypad_set_wake(unsigned int on)
-{
- unsigned int i, gpio, mask = 0;
-
- if (!on) {
- PKWR = 0;
- return 0;
- }
-
- for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
-
- gpio = pxa27x_pkwr_gpio[i];
-
- if (gpio_desc[gpio].config & MFP_LPM_CAN_WAKEUP)
- mask |= gpio_desc[gpio].mask;
- }
-
- PKWR = mask;
- return 0;
-}
-
#define PWER_WEMUX2_GPIO38 (1 << 16)
#define PWER_WEMUX2_GPIO53 (2 << 16)
#define PWER_WEMUX2_GPIO40 (3 << 16)
@@ -273,6 +243,12 @@
gpio_desc[(gpio)].mux_mask = PWER_ ## mux ## _MASK; \
} while (0)
+
+static int pxa27x_pkwr_gpio[] = {
+ 13, 16, 17, 34, 36, 37, 38, 39, 90, 91, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102
+};
+
static void __init pxa27x_mfp_init(void)
{
int i, gpio;
@@ -291,7 +267,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.ofic/mach-pxa/pxa27x.c 2009-09-10 00:13:59.000000000 +0200
+++ ./arch/arm/mach-pxa/pxa27x.c 2009-12-29 03:13:00.000000000 +0100
@@ -323,9 +323,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
WARNING: multiple messages have this Message-ID (diff)
From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: 32-rc1 aka 32-rc2: warning at manage.c:361 (set_irq_wake), matrix-keypad related?
Date: Sat, 2 Jan 2010 16:27:24 +0100 [thread overview]
Message-ID: <20100102152723.GA10476@ucw.cz> (raw)
In-Reply-To: <20100102135608.GA5872@ucw.cz>
On Sat 2010-01-02 14:56:09, Pavel Machek wrote:
> Hi!
>
> > > > We ignore the failure right now in the mainline but that causes stack
> > > > traces on resume as we trying to disable not enabled wakeup GPIOs. That
> > > > was original Pavel's complaint.
> > >
> > > Yep...
> > >
> > > I'd say that BUG() simply should not trigger if wakeup can not be
> > > enabled/disabled for particular source...?
> >
> > Pavel,
> >
> > Could you please try the patch below and let me know if it fixes the
> > problem for you?
>
> (sorry for long delay).
>
> With 33-rc1+your patch, warnings are no longer there.
>
> I still have one on irq191, but that's gpio button driver.
>
> But please, hold the patch for few more days. I may have cleaner/nicer
> solution. It seems that zaurus is doing something very stupid in low
> layers.
I'm thinking that maybe something like this should do the trick.
--- ./arch/arm.ofic/mach-pxa/mfp-pxa2xx.c 2009-09-10 00:13:59.000000000 +0200
+++ ./arch/arm/mach-pxa/mfp-pxa2xx.c 2009-12-29 03:16:40.000000000 +0100
@@ -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;
@@ -231,32 +227,6 @@
#endif /* CONFIG_PXA25x */
#ifdef CONFIG_PXA27x
-static int pxa27x_pkwr_gpio[] = {
- 13, 16, 17, 34, 36, 37, 38, 39, 90, 91, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102
-};
-
-int keypad_set_wake(unsigned int on)
-{
- unsigned int i, gpio, mask = 0;
-
- if (!on) {
- PKWR = 0;
- return 0;
- }
-
- for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
-
- gpio = pxa27x_pkwr_gpio[i];
-
- if (gpio_desc[gpio].config & MFP_LPM_CAN_WAKEUP)
- mask |= gpio_desc[gpio].mask;
- }
-
- PKWR = mask;
- return 0;
-}
-
#define PWER_WEMUX2_GPIO38 (1 << 16)
#define PWER_WEMUX2_GPIO53 (2 << 16)
#define PWER_WEMUX2_GPIO40 (3 << 16)
@@ -273,6 +243,12 @@
gpio_desc[(gpio)].mux_mask = PWER_ ## mux ## _MASK; \
} while (0)
+
+static int pxa27x_pkwr_gpio[] = {
+ 13, 16, 17, 34, 36, 37, 38, 39, 90, 91, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102
+};
+
static void __init pxa27x_mfp_init(void)
{
int i, gpio;
@@ -291,7 +267,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.ofic/mach-pxa/pxa27x.c 2009-09-10 00:13:59.000000000 +0200
+++ ./arch/arm/mach-pxa/pxa27x.c 2009-12-29 03:13:00.000000000 +0100
@@ -323,9 +323,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
next prev parent reply other threads:[~2010-01-02 20:59 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 20:07 32-rc1 aka 32-rc2: warning at manage.c:361 (set_irq_wake), matrix-keypad related? Pavel Machek
2009-09-30 20:07 ` Pavel Machek
2009-09-30 20:07 ` Pavel Machek
2009-10-06 5:06 ` Dmitry Torokhov
2009-10-06 5:06 ` Dmitry Torokhov
2009-10-06 5:06 ` Dmitry Torokhov
2009-10-06 7:58 ` Pavel Machek
2009-10-06 7:58 ` Pavel Machek
2009-10-07 4:36 ` Dmitry Torokhov
2009-10-07 4:36 ` Dmitry Torokhov
2009-10-07 4:36 ` Dmitry Torokhov
2009-10-07 14:42 ` Eric Miao
2009-10-07 14:42 ` Eric Miao
2009-10-07 14:42 ` Eric Miao
2009-10-07 16:33 ` Dmitry Torokhov
2009-10-07 16:33 ` Dmitry Torokhov
2009-10-07 16:33 ` Dmitry Torokhov
2009-10-07 21:12 ` Pavel Machek
2009-10-07 21:12 ` Pavel Machek
2009-10-07 21:12 ` Pavel Machek
2009-12-03 3:17 ` Dmitry Torokhov
2009-12-03 3:17 ` Dmitry Torokhov
2010-01-02 13:56 ` Pavel Machek
2010-01-02 13:56 ` Pavel Machek
2010-01-02 15:27 ` Pavel Machek [this message]
2010-01-02 15:27 ` Pavel Machek
2010-01-02 21:06 ` Pavel Machek
2010-01-02 21:06 ` Pavel Machek
2010-01-03 7:57 ` Dmitry Torokhov
2010-01-03 7:57 ` Dmitry Torokhov
2010-01-03 8:00 ` Pavel Machek
2010-01-03 8:00 ` Pavel Machek
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=20100102152723.GA10476@ucw.cz \
--to=pavel@ucw.cz \
--cc=Dirk@opfer-online.de \
--cc=arminlitzel@web.de \
--cc=dbaryshkov@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.