From: "Mark F. Brown" <mark.brown314@gmail.com>
To: Eric Miao <eric.y.miao@gmail.com>,
Haojian Zhuang <haojian.zhuang@marvell.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>li
Cc: "Mark F. Brown" <mark.brown314@gmail.com>
Subject: [PATCH v2 5/6] ARM: pxa168: added keypad wake clear event support for platform
Date: Thu, 26 Aug 2010 11:27:36 -0400 [thread overview]
Message-ID: <1282836457-5651-6-git-send-email-mark.brown314@gmail.com> (raw)
In-Reply-To: <1282836457-5651-1-git-send-email-mark.brown314@gmail.com>
Signed-off-by: Mark F. Brown <mark.brown314@gmail.com>
---
arch/arm/mach-mmp/include/mach/pxa168.h | 5 +++++
arch/arm/mach-mmp/pxa168.c | 10 ++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index f34e663..1801e42 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -5,6 +5,7 @@ struct sys_timer;
extern struct sys_timer pxa168_timer;
extern void __init pxa168_init_irq(void);
+extern void pxa168_clear_keypad_wakeup(void);
#include <linux/i2c.h>
#include <mach/devices.h>
@@ -12,6 +13,7 @@ extern void __init pxa168_init_irq(void);
#include <plat/pxa3xx_nand.h>
#include <video/pxa168fb.h>
#include <plat/pxa27x_keypad.h>
+#include <mach/cputype.h>
extern struct pxa_device_desc pxa168_device_uart1;
extern struct pxa_device_desc pxa168_device_uart2;
@@ -109,6 +111,9 @@ static inline int pxa168_add_fb(struct pxa168fb_mach_info *mi)
static inline int pxa168_add_keypad(struct pxa27x_keypad_platform_data *data)
{
+ if (cpu_is_pxa168())
+ data->clear_wakeup_event = pxa168_clear_keypad_wakeup;
+
return pxa_register_device(&pxa168_device_keypad, data, sizeof(*data));
}
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index 2fa16fb..72b4e76 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -136,6 +136,16 @@ struct sys_timer pxa168_timer = {
.init = pxa168_timer_init,
};
+void pxa168_clear_keypad_wakeup(void)
+{
+ uint32_t val;
+ uint32_t mask = APMU_PXA168_KP_WAKE_CLR;
+
+ /* wake event clear is needed in order to clear keypad interrupt */
+ val = __raw_readl(APMU_WAKE_CLR);
+ __raw_writel(val | mask, APMU_WAKE_CLR);
+}
+
/* on-chip devices */
PXA168_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4017000, 0x30, 21, 22);
PXA168_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4018000, 0x30, 23, 24);
--
1.7.0.4
next prev parent reply other threads:[~2010-09-03 21:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-26 15:27 [PATCH v2 0/6] ARM: pxa168: add keypad support Mark F. Brown
2010-08-26 15:27 ` [PATCH v2 1/6] ARM: pxa27x/pxa3xx: moved pxa27x_keypad.h to platform pxa directory Mark F. Brown
2010-08-26 15:27 ` [PATCH v2 2/6] ARM: pxa168: added keypad support Mark F. Brown
2010-08-26 15:27 ` [PATCH v2 3/6] ARM: pxa168: added wake clear register support for APMU Mark F. Brown
2010-08-26 15:27 ` [PATCH v2 4/6] ARM: pxa27x_keypad: added wakeup event handler for keypad interrupts Mark F. Brown
2010-08-26 15:27 ` Mark F. Brown [this message]
2010-08-26 15:27 ` [PATCH v2 6/6] ARM: pxa168: aspenite: add board support for keypad Mark F. Brown
2010-09-03 21:52 ` [PATCH v2 0/6] ARM: pxa168: add keypad support David Miller
2010-09-03 22:06 ` Mark F. Brown
[not found] ` <1282836457-5651-2-git-send-email-mark.brown314@gmail.com>
2010-09-04 2:11 ` [PATCH v2 1/6] ARM: pxa27x/pxa3xx: moved pxa27x_keypad.h to platform pxa directory Marek Vasut
[not found] ` <1282836457-5651-7-git-send-email-mark.brown314@gmail.com>
2010-09-04 2:12 ` [PATCH v2 6/6] ARM: pxa168: aspenite: add board support for keypad Marek Vasut
2010-09-04 2:56 ` Mark F. Brown
2010-09-04 5:23 ` Marek Vasut
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=1282836457-5651-6-git-send-email-mark.brown314@gmail.com \
--to=mark.brown314@gmail.com \
--cc=eric.y.miao@gmail.com \
--cc=haojian.zhuang@marvell.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).