From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: zaurus spitz suspend/resume issue
Date: Tue, 20 Apr 2010 15:36:24 +0200 [thread overview]
Message-ID: <20100420133624.GA8670@ucw.cz> (raw)
In-Reply-To: <i2pf17812d71004192358hd49d803nf82b44d5f3585212@mail.gmail.com>
Hi!
> >> ? ?Since resuming my spitz from a suspended state doesn't work in 2.6.34-rc3
> >> ? ?at the moment, I've tried to find out what the problem is with
> >> ? ?suspend/resume. Using CONFIG_PM_DEBUG I tried to test this by setting
> >> ? ?/sys/power/pm_test to "core" and switching the device off with the power
> >> ? ?button. This indeed suspends and resumes the device, but shows following
> >> ? ?in the system log:
> >
> > It works here.
>
> Or maybe we should allow these GPIOs to wakeup the system when either
> configured as generic GPIOs or keypad GPIOs.
So... there's a bug in pxa-keypad driver -- it enables wakeup on one
line when it needs wakeup on all.
So we invented a workaround, in mfp-pxa2xx.c, where we change wakeup
on many lines when pxa-keypad wants to toggle wakeup on one.
But that workaround causes problems, so we
> diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
> index cf6b720..29301d2 100644
> --- a/arch/arm/mach-pxa/mfp-pxa2xx.c
> +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
> @@ -178,8 +178,17 @@ int gpio_set_wake(unsigned int gpio, unsigned int on)
> - if (d->keypad_gpio)
> - return -EINVAL;
> + /* Allow keypad GPIOs to wakeup system when
> + * configured as generic GPIOs.
> + */
> + if (d->keypad_gpio && (MFP_AF(d->config) == 0) &&
> + (d->config & MFP_LPM_CAN_WAKEUP)) {
> + if (on)
> + PKWR |= d->mask;
> + else
> + PKWR &= ~d->mask;
> + return 0;
> + }
Add more hacks on top.
What about simply fixing pxa-keypad? Then we can git of workaround,
and spitz will be fixed.
Fix should be as simple as replacing enable_irq_wakeup() with more
enable_irq_wakeup()s.
Pavel
--
(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-20 13:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-18 19:00 zaurus spitz suspend/resume issue - Cortez -
2010-04-19 5:17 ` [Zaurus-devel] " Pavel Machek
2010-04-19 13:35 ` Pavel Machek
2010-04-20 6:58 ` Eric Miao
2010-04-20 13:36 ` 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=20100420133624.GA8670@ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-arm-kernel@lists.infradead.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).