diff options
author | Robin Gong <b38343@freescale.com> | 2014-06-18 14:14:09 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2017-06-08 19:27:54 +0800 |
commit | 6e19d1bb8a8c84dfe7c3492f441b122deef10585 (patch) | |
tree | e196a2e06c8976d0f4e82c9a615ccb1fe49820fb /drivers/input | |
parent | 9cc8747e3ffd84464def8de077ada5c3a4a43207 (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>
(cherry picked from commit 806ed5b9769efff2c9d8c66ed19315b48ec6fd57)
(cherry picked from commit 307d613b1f363f802433cd2debbb2b28ddc17a06)
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/imx_keypad.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 6ed08015a345..ffc983da3844 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -282,11 +282,6 @@ static void imx_keypad_check_for_events(unsigned long data) reg_val = readw(keypad->mmio_base + KPSR); reg_val |= KBD_STAT_KPKR | KBD_STAT_KRSS; writew(reg_val, keypad->mmio_base + KPSR); - - reg_val = readw(keypad->mmio_base + KPSR); - reg_val |= KBD_STAT_KRIE; - reg_val &= ~KBD_STAT_KDIE; - writew(reg_val, keypad->mmio_base + KPSR); } } @@ -538,6 +533,7 @@ static int __maybe_unused imx_kbd_suspend(struct device *dev) struct platform_device *pdev = to_platform_device(dev); struct imx_keypad *kbd = platform_get_drvdata(pdev); struct input_dev *input_dev = kbd->input_dev; + unsigned short reg_val = readw(kbd->mmio_base + KPSR); /* imx kbd can wake up system even clock is disabled */ mutex_lock(&input_dev->mutex); @@ -547,8 +543,14 @@ static int __maybe_unused imx_kbd_suspend(struct device *dev) mutex_unlock(&input_dev->mutex); - if (device_may_wakeup(&pdev->dev)) + if (device_may_wakeup(&pdev->dev)) { + /* make sure KDI interrupt enabled */ + reg_val |= KBD_STAT_KDIE; + reg_val &= ~KBD_STAT_KRIE; + writew(reg_val, kbd->mmio_base + KPSR); + enable_irq_wake(kbd->irq); + } return 0; } |