From: Igor Grinberg <grinberg@compulab.co.il>
To: "Mark F. Brown" <mark.brown314@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>,
Haojian Zhuang <haojian.zhuang@marvell.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH v2 4/6 RESEND] ARM: pxa27x_keypad: added wakeup event handler for keypad interrupts
Date: Sun, 05 Sep 2010 11:02:35 +0300 [thread overview]
Message-ID: <4C834E9B.5080505@compulab.co.il> (raw)
In-Reply-To: <1283552891-13966-5-git-send-email-mark.brown314@gmail.com>
On 09/04/10 01:28, Mark F. Brown wrote:
> mach-mmp needs to clear wake event in order to clear the keypad interrupt
>
> Signed-off-by: Mark F. Brown <mark.brown314@gmail.com>
> ---
> arch/arm/plat-pxa/include/plat/pxa27x_keypad.h | 1 +
> drivers/input/keyboard/pxa27x_keypad.c | 10 ++++++++++
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-pxa/include/plat/pxa27x_keypad.h b/arch/arm/plat-pxa/include/plat/pxa27x_keypad.h
> index 7b4eadc..73dacda 100644
> --- a/arch/arm/plat-pxa/include/plat/pxa27x_keypad.h
> +++ b/arch/arm/plat-pxa/include/plat/pxa27x_keypad.h
> @@ -52,6 +52,7 @@ struct pxa27x_keypad_platform_data {
>
> /* key debounce interval */
> unsigned int debounce_interval;
> + void (*clear_wakeup_event)(void);
I understand, this is a bit late... but still I want to ask a question:
As I understand, the clear_wakeup_event() function is called in interrupt context,
wouldn't it be wiser to add a comment on this, so platform (current/future) code
will be aware and will make no heavy stuff in it (accidentally).
> };
>
> extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
> diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
> index 0610d10..b36d2be 100644
> --- a/drivers/input/keyboard/pxa27x_keypad.c
> +++ b/drivers/input/keyboard/pxa27x_keypad.c
> @@ -330,11 +330,21 @@ static void pxa27x_keypad_scan_direct(struct pxa27x_keypad *keypad)
> keypad->direct_key_state = new_state;
> }
>
> +static void clear_wakeup_event(struct pxa27x_keypad *keypad)
> +{
> + struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
> +
> + if (pdata->clear_wakeup_event)
> + (pdata->clear_wakeup_event)();
> +}
> +
> static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id)
> {
> struct pxa27x_keypad *keypad = dev_id;
> unsigned long kpc = keypad_readl(KPC);
>
> + clear_wakeup_event(keypad);
> +
> if (kpc & KPC_DI)
> pxa27x_keypad_scan_direct(keypad);
>
--
Regards,
Igor.
next prev parent reply other threads:[~2010-09-05 8:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 22:28 [PATCH v2 0/6 RESEND] ARM: pxa168: add keypad support Mark F. Brown
2010-09-03 22:28 ` [PATCH v2 1/6 RESEND] ARM: pxa27x/pxa3xx: moved pxa27x_keypad.h to platform pxa directory Mark F. Brown
2010-09-04 7:40 ` Eric Miao
2010-09-03 22:28 ` [PATCH v2 2/6 RESEND] ARM: pxa168: added keypad support Mark F. Brown
2010-09-04 7:41 ` Eric Miao
2010-09-03 22:28 ` [PATCH v2 3/6 RESEND] ARM: pxa168: added wake clear register support for APMU Mark F. Brown
2010-09-04 7:41 ` Eric Miao
2010-09-03 22:28 ` [PATCH v2 4/6 RESEND] ARM: pxa27x_keypad: added wakeup event handler for keypad interrupts Mark F. Brown
2010-09-04 7:41 ` Eric Miao
2010-09-05 8:02 ` Igor Grinberg [this message]
2010-09-05 10:46 ` Eric Miao
2010-09-05 15:28 ` Mark F. Brown
2010-09-03 22:28 ` [PATCH v2 5/6 RESEND] ARM: pxa168: added keypad wake clear event support for platform Mark F. Brown
2010-09-04 7:41 ` Eric Miao
2010-09-03 22:28 ` [PATCH v2 6/6 RESEND] ARM: pxa168: aspenite: add board support for keypad Mark F. Brown
2010-09-04 7:42 ` Eric Miao
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=4C834E9B.5080505@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=eric.y.miao@gmail.com \
--cc=haojian.zhuang@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.brown314@gmail.com \
/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
Powered by JetHome