Skip to contentSkip to conversation

ARM: pxa27x_keypad: clear pending interrupts on keypad config

PATCH Superseded Vasily Khoruzhick 1 participant 1 message Feb 26, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: pxa27x_keypad: clear pending interrupts on keypad config

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

---
 drivers/input/keyboard/pxa27x_keypad.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/input/keyboard/pxa27x_keypad.c +3 -0
index eca6ae6..a5f198f 100644
@@ -360,6 +360,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;
Signature · 1 line
1.7.9.2