From ab5739a17953b22480dc7caf6603380d563c53fc Mon Sep 17 00:00:00 2001 From: "Mark F. Brown" Date: Fri, 3 Sep 2010 18:28:10 -0400 Subject: ARM: pxa168: added keypad wake clear event support for platform Signed-off-by: Mark F. Brown Signed-off-by: Eric Miao --- arch/arm/mach-mmp/pxa168.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-mmp/pxa168.c') diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 2fa16fb4503c..72b4e7631583 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); -- cgit v1.2.3