summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/mxc_keyb.c
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2009-10-26 11:13:00 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-12 17:19:22 +0100
commit0013e8e158f7f4e3c136e4722f8743494c9fee36 (patch)
tree3e935740c8bbf6c04b573544b01dad60cd40dab3 /drivers/input/keyboard/mxc_keyb.c
parent0f25dedd32b7c09d56a6d5e79133da2eee7e8f7d (diff)
ENGR00116921 Keypad will not respond if pressing during boot
The keypad interrupt registering must be put at the end of probe, behind the timer init. Otherwise, interrupt will occur during keypad initial. Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
Diffstat (limited to 'drivers/input/keyboard/mxc_keyb.c')
-rw-r--r--drivers/input/keyboard/mxc_keyb.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/input/keyboard/mxc_keyb.c b/drivers/input/keyboard/mxc_keyb.c
index 248b8e560903..99dd7cf51cb5 100644
--- a/drivers/input/keyboard/mxc_keyb.c
+++ b/drivers/input/keyboard/mxc_keyb.c
@@ -774,19 +774,8 @@ static int mxc_kpp_probe(struct platform_device *pdev)
kpp_dev.kpp_rows = keypad->rowmax;
key_pad_enabled = 0;
- /*
- * Request for IRQ number for keypad port. The Interrupt handler
- * function (mxc_kpp_interrupt) is called when ever interrupt occurs on
- * keypad port.
- */
irq = platform_get_irq(pdev, 0);
keypad->irq = irq;
- retval = request_irq(irq, mxc_kpp_interrupt, 0, MOD_NAME, MOD_NAME);
- if (retval) {
- pr_debug("KPP: request_irq(%d) returned error %d\n",
- MXC_INT_KPP, retval);
- return retval;
- }
/* Enable keypad clock */
kpp_clk = clk_get(&pdev->dev, "kpp_clk");
@@ -915,6 +904,18 @@ static int mxc_kpp_probe(struct platform_device *pdev)
/* Initialize the polling timer */
init_timer(&kpp_dev.poll_timer);
+ /*
+ * Request for IRQ number for keypad port. The Interrupt handler
+ * function (mxc_kpp_interrupt) is called when ever interrupt occurs on
+ * keypad port.
+ */
+ retval = request_irq(irq, mxc_kpp_interrupt, 0, MOD_NAME, MOD_NAME);
+ if (retval) {
+ pr_debug("KPP: request_irq(%d) returned error %d\n",
+ MXC_INT_KPP, retval);
+ goto err3;
+ }
+
/* By default, devices should wakeup if they can */
/* So keypad is set as "should wakeup" as it can */
device_init_wakeup(&pdev->dev, 1);