aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Gong <b38343@freescale.com>2014-06-18 02:14:09 -0400
committerRobin Gong <b38343@freescale.com>2014-06-19 00:56:10 -0400
commit560a64749d1dd0ff2352f625ca12eecea17064f4 (patch)
tree7674e35177822ea862b683cdc40f5be386b90e4e
parent93e23abbe445dbd28b76080ef9cedd3de9b04844 (diff)
ENGR00318936-2 input: keyboard: imx: remove usless release interrupt enabled code
Remove useless code for release interrupt enabled, because we check status by timer rather than release interrupt. Remove the code which may disable depress interrupt. Also make sure enable depress interrupt in suspend function. Signed-off-by: Robin Gong <b38343@freescale.com>
-rw-r--r--drivers/input/keyboard/imx_keypad.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
index 6c545bf607e7..12e49f17e740 100644
--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -285,11 +285,6 @@ static void imx_keypad_check_for_events(unsigned long data)
285 reg_val = readw(keypad->mmio_base + KPSR); 285 reg_val = readw(keypad->mmio_base + KPSR);
286 reg_val |= KBD_STAT_KPKR | KBD_STAT_KRSS; 286 reg_val |= KBD_STAT_KPKR | KBD_STAT_KRSS;
287 writew(reg_val, keypad->mmio_base + KPSR); 287 writew(reg_val, keypad->mmio_base + KPSR);
288
289 reg_val = readw(keypad->mmio_base + KPSR);
290 reg_val |= KBD_STAT_KRIE;
291 reg_val &= ~KBD_STAT_KDIE;
292 writew(reg_val, keypad->mmio_base + KPSR);
293 } 288 }
294} 289}
295 290
@@ -545,6 +540,7 @@ static int imx_kbd_suspend(struct device *dev)
545 struct platform_device *pdev = to_platform_device(dev); 540 struct platform_device *pdev = to_platform_device(dev);
546 struct imx_keypad *kbd = platform_get_drvdata(pdev); 541 struct imx_keypad *kbd = platform_get_drvdata(pdev);
547 struct input_dev *input_dev = kbd->input_dev; 542 struct input_dev *input_dev = kbd->input_dev;
543 unsigned short reg_val = readw(kbd->mmio_base + KPSR);
548 544
549 /* imx kbd can wake up system even clock is disabled */ 545 /* imx kbd can wake up system even clock is disabled */
550 mutex_lock(&input_dev->mutex); 546 mutex_lock(&input_dev->mutex);
@@ -554,8 +550,14 @@ static int imx_kbd_suspend(struct device *dev)
554 550
555 mutex_unlock(&input_dev->mutex); 551 mutex_unlock(&input_dev->mutex);
556 552
557 if (device_may_wakeup(&pdev->dev)) 553 if (device_may_wakeup(&pdev->dev)) {
554 /* make sure KDI interrupt enabled */
555 reg_val |= KBD_STAT_KDIE;
556 reg_val &= ~KBD_STAT_KRIE;
557 writew(reg_val, kbd->mmio_base + KPSR);
558
558 enable_irq_wake(kbd->irq); 559 enable_irq_wake(kbd->irq);
560 }
559 else 561 else
560 pinctrl_pm_select_sleep_state(dev); 562 pinctrl_pm_select_sleep_state(dev);
561 563