summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorIllia Smyrnov2013-08-26 08:26:16 +0200
committerDmitry Torokhov2013-08-26 09:15:53 +0200
commitafbac60b0c535189a76855a04d85492cf2d992e1 (patch)
tree615b655355846c58299f0db39efe5740b875b955 /drivers/input
parentInput: omap-keypad - convert to threaded IRQ (diff)
downloadkernel-qcow2-linux-afbac60b0c535189a76855a04d85492cf2d992e1.tar.gz
kernel-qcow2-linux-afbac60b0c535189a76855a04d85492cf2d992e1.tar.xz
kernel-qcow2-linux-afbac60b0c535189a76855a04d85492cf2d992e1.zip
Input: omap-keypad - clear interrupts on open
According to TRM, the recommended way for keyboard controller initialization is clear the interrupt-status register, then set up certain keyboard events for generating an interrupt request and set up expected source of wake-up event that generates a wake-up request. Signed-off-by: Illia Smyrnov <illia.smyrnov@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/omap4-keypad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index b876a0d8c6be..0244262e2600 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -185,8 +185,9 @@ static int omap4_keypad_open(struct input_dev *input)
(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
OMAP4_VAL_DEBOUNCINGTIME);
+ /* clear pending interrupts */
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
- OMAP4_VAL_IRQDISABLE);
+ kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
OMAP4_DEF_IRQENABLE_EVENTEN |
OMAP4_DEF_IRQENABLE_LONGKEY);