diff options
author | Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> | 2011-02-04 14:46:08 +0530 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:14:37 +0200 |
commit | 6d00078770d59c1d3abe00502d0b8595e6559b02 (patch) | |
tree | c93e8215ce1eab67c1c5ab5d2127c761ae0f796d /drivers | |
parent | e44be4be7359644852d227c51bb61be831f68a8c (diff) |
input:ske: Remove multiple interrupts for each keypress
Remove the multiple interrupts for each key press
of the ske keypad.
ST-Ericsson Id: ER 323157
Change-Id: Ib0d9827895c72c47e83006a1498401849c1c16db
Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/14599
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/nomadik-ske-keypad.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 1286007ac23..8025b236c58 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -244,18 +244,21 @@ static void ske_keypad_read_data(struct ske_keypad *keypad) static irqreturn_t ske_keypad_irq(int irq, void *dev_id) { struct ske_keypad *keypad = dev_id; - int retries = 20; /* disable auto scan interrupt; mask the interrupt generated */ ske_keypad_set_bits(keypad, SKE_IMSC, ~SKE_KPIMA, 0x0); ske_keypad_set_bits(keypad, SKE_ICR, 0x0, SKE_KPICA); - while ((readl(keypad->reg_base + SKE_CR) & SKE_KPASON) && --retries) + while (readl(keypad->reg_base + SKE_CR) & SKE_KPASON) cpu_relax(); /* SKEx registers are stable and can be read */ ske_keypad_read_data(keypad); + /* wait one debounce ms */ + while (readl(keypad->reg_base + SKE_RIS)) + cpu_relax(); + /* enable auto scan interrupts */ ske_keypad_set_bits(keypad, SKE_IMSC, 0x0, SKE_KPIMA); @@ -349,7 +352,6 @@ static int __devinit ske_keypad_probe(struct platform_device *pdev) goto out_freeinput; } - keypad->board = plat; keypad->irq = irq; keypad->board = plat; keypad->input = input; |