From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: thommycheck@gmail.com, dbaryshkov@gmail.com,
Cyril Hrubis <metan@ucw.cz>,
arminlitzel@web.de, kernel list <linux-kernel@vger.kernel.org>,
Dirk@Opfer-Online.de, utx@penguin.cz, lenz@cs.wisc.edu,
rpurdie@rpsys.net, omegamoon@gmail.com,
linux-input@vger.kernel.org, eric.y.miao@gmail.com,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: 32-rc1 aka 32-rc2: warning at manage.c:361 (set_irq_wake), matrix-keypad related?
Date: Mon, 5 Oct 2009 22:06:50 -0700 [thread overview]
Message-ID: <20091006050649.GH27881@core.coreip.homeip.net> (raw)
In-Reply-To: <20090930200746.GA1384@ucw.cz>
Hi Pavel,
On Wed, Sep 30, 2009 at 10:07:46PM +0200, Pavel Machek wrote:
> Hi!
>
> It complains about unbalanced irq 113 wake disable. That one belongs
> to matrix-keypad...
I guess some of enable_irq_wake()s fail on your box. Do you see it if
you apply the patch below?
Thanks.
--
Dmitry
Input: matrix-keypad - report errors from enable_irq_wake()
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/keyboard/matrix_keypad.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index 91cfe51..488171c 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -218,14 +218,29 @@ static int matrix_keypad_suspend(struct platform_device *pdev, pm_message_t stat
struct matrix_keypad *keypad = platform_get_drvdata(pdev);
const struct matrix_keypad_platform_data *pdata = keypad->pdata;
int i;
+ int err;
matrix_keypad_stop(keypad->input_dev);
- if (device_may_wakeup(&pdev->dev))
- for (i = 0; i < pdata->num_row_gpios; i++)
- enable_irq_wake(gpio_to_irq(pdata->row_gpios[i]));
+ if (device_may_wakeup(&pdev->dev)) {
+ for (i = 0; i < pdata->num_row_gpios; i++) {
+ err = enable_irq_wake(gpio_to_irq(pdata->row_gpios[i]));
+ if (err) {
+ dev_err(&pdev->dev,
+ "Failed to setup GPIO %d as "
+ "wakeup source, err: %d\n",
+ pdata->row_gpios[i], err);
+ goto err_out;
+ }
+ }
+ }
return 0;
+
+ err_out:
+ while (--i >= 0)
+ disable_irq_wake(gpio_to_irq(pdata->row_gpios[i]));
+ return err;
}
static int matrix_keypad_resume(struct platform_device *pdev)
next prev parent reply other threads:[~2009-10-06 5:06 UTC|newest]
Thread overview: 13+ 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-10-06 5:06 ` Dmitry Torokhov [this message]
2009-10-06 7:58 ` Pavel Machek
2009-10-07 4:36 ` Dmitry Torokhov
2009-10-07 14:42 ` Eric Miao
2009-10-07 16:33 ` Dmitry Torokhov
2009-10-07 21:12 ` Pavel Machek
2009-12-03 3:17 ` Dmitry Torokhov
2010-01-02 13:56 ` Pavel Machek
2010-01-02 15:27 ` Pavel Machek
2010-01-02 21:06 ` Pavel Machek
2010-01-03 7:57 ` Dmitry Torokhov
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=20091006050649.GH27881@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=Dirk@Opfer-Online.de \
--cc=arminlitzel@web.de \
--cc=dbaryshkov@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=pavel@ucw.cz \
--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 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).