linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: eric.y.miao@gmail.com (Eric Miao)
To: linux-arm-kernel@lists.infradead.org
Subject: 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)
Date: Tue, 26 Jan 2010 19:39:40 +0800	[thread overview]
Message-ID: <f17812d71001260339h6184c82bj25ff13a168284c24@mail.gmail.com> (raw)
In-Reply-To: <1264502668.4480.97.camel@utx.utx.cz>

2010/1/26 Stanislav Brabec <utx@penguin.cz>:
> Eric Miao wrote:
>> 2010/1/26 Stanislav Brabec <utx@penguin.cz>:
>
>> > Handling platform specific edge/level wake setup would only complicate
>> > the code. (In fact, even the PXA270 platform code does not exist yet -
>> > arch/arm/mach-pxa/mfp-pxa2xx.c:__mfp_config_gpio() is not capable to
>> > configure Power Manager Keyboard Wake-Up Enable Register (PKWR).)
>> That's why WAKEUP_ON_EDGE_* is introduced, no need for gpio-keys
>> to know this.
>
> But WAKEUP_ON_EDGE_* is impossible for GPIO 95,
> enable_irq_wake()/gpio_set_wake() returns EINVAL and disable_irq_wake()
> complains on "Unbalanced IRQ 191".
>

Now I see, but I don't know why disable_irq_wake() will complains about
unbalance since it should really manage it well.

A quick dirty solution would be the platform to call keypad_set_wake()
directly somewhere. Otherwise we have to let gpio_set_wake() to handle
those keypad GPIOs and to live together with keypad_set_wake() happily,
which is really difficult.

> In case of Zaurus, gpio_keys.c have to live with wakeup on level (PKWR)
> when using enable/disable_irq_wake().
>
>> > The problem affects gpio_keys: It is a driver implementing "one key per
>> > gpio". It now handles On/Off and lid switches on Zaurus. Lid switches
>> > are on "normal" GPIOs, On/Off switch is wired to PKWR capable GPIO.
>> Ain't On/Off switch one of the matrix key? And so SPITZ_GPIO_KEY_INT
>> could be used to handle that?
>
> No. On/Off is connected directly to GPIO 95. Other keys use strobe/sense
> matrix keypad.
>
> SPITZ_GPIO_KEY_INT is a bit unspecific. I think it means: Charger was
> inserted or key was pressed or On/Off was pressed.
>
>
>
> ________________________________________________________________________
> Stanislav Brabec
> http://www.penguin.cz/~utx/zaurus
>
>

  parent reply	other threads:[~2010-01-26 11:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06  7:10 sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1 Pavel Machek
2010-01-06  7:17 ` Eric Miao
2010-01-07  6:52   ` Pavel Machek
2010-01-07  7:33     ` Eric Miao
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
2010-01-26  3:58           ` Eric Miao
2010-01-26 10:13             ` Stanislav Brabec
2010-01-26 10:20               ` Eric Miao
2010-01-26 10:44                 ` Stanislav Brabec
2010-01-26 11:23                   ` Dmitry Eremin-Solenikov
2010-01-26 11:39                   ` Eric Miao [this message]
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

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=f17812d71001260339h6184c82bj25ff13a168284c24@mail.gmail.com \
    --to=eric.y.miao@gmail.com \
    --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).