diff options
author | Mark F. Brown <mark.brown314@gmail.com> | 2010-09-03 18:28:09 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-10-09 05:07:19 -0400 |
commit | 3587c258078479824342f33dc513ca7c66d729bc (patch) | |
tree | 2df8b4f65663cddedbba2763a048ce3b0ac6ba43 /drivers | |
parent | 2ce4389068129fb4a8756b5ba126da1260f5dbef (diff) |
ARM: pxa27x_keypad: added wakeup event handler for keypad interrupts
mach-mmp needs to clear wake event in order to clear the keypad interrupt
Signed-off-by: Mark F. Brown <mark.brown314@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/pxa27x_keypad.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 731bd88bb076..4b0ec35259a1 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) | |||
330 | keypad->direct_key_state = new_state; | 330 | keypad->direct_key_state = new_state; |
331 | } | 331 | } |
332 | 332 | ||
333 | static void clear_wakeup_event(struct pxa27x_keypad *keypad) | ||
334 | { | ||
335 | struct pxa27x_keypad_platform_data *pdata = keypad->pdata; | ||
336 | |||
337 | if (pdata->clear_wakeup_event) | ||
338 | (pdata->clear_wakeup_event)(); | ||
339 | } | ||
340 | |||
333 | static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id) | 341 | static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id) |
334 | { | 342 | { |
335 | struct pxa27x_keypad *keypad = dev_id; | 343 | struct pxa27x_keypad *keypad = dev_id; |
336 | unsigned long kpc = keypad_readl(KPC); | 344 | unsigned long kpc = keypad_readl(KPC); |
337 | 345 | ||
346 | clear_wakeup_event(keypad); | ||
347 | |||
338 | if (kpc & KPC_DI) | 348 | if (kpc & KPC_DI) |
339 | pxa27x_keypad_scan_direct(keypad); | 349 | pxa27x_keypad_scan_direct(keypad); |
340 | 350 | ||