浏览代码

Input: pxa27x_keypad - clear pending interrupts on keypad config

Bootloader can leave interrupt bit pending, and it confuses driver.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Vasily Khoruzhick 12 年之前
父节点
当前提交
904adede08
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/input/keyboard/pxa27x_keypad.c

+ 3 - 0
drivers/input/keyboard/pxa27x_keypad.c

@@ -368,6 +368,9 @@ static void pxa27x_keypad_config(struct pxa27x_keypad *keypad)
 	unsigned int mask = 0, direct_key_num = 0;
 	unsigned long kpc = 0;
 
+	/* clear pending interrupt bit */
+	keypad_readl(KPC);
+
 	/* enable matrix keys with automatic scan */
 	if (pdata->matrix_key_rows && pdata->matrix_key_cols) {
 		kpc |= KPC_ASACT | KPC_MIE | KPC_ME | KPC_MS_ALL;