summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/imx_keypad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/imx_keypad.c')
-rw-r--r--drivers/input/keyboard/imx_keypad.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
index 842c0235471d..9d3971818e05 100644
--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -1,6 +1,7 @@
/*
* Driver for the IMX keypad port.
* Copyright (C) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com>
+ * Copyright (C) 2015 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -267,6 +268,7 @@ static void imx_keypad_check_for_events(unsigned long data)
reg_val |= KBD_STAT_KDIE;
reg_val &= ~KBD_STAT_KRIE;
writew(reg_val, keypad->mmio_base + KPSR);
+ pm_relax(keypad->input_dev->dev.parent);
} else {
/*
* Some keys are still pressed. Schedule a rescan in
@@ -280,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);
}
}
@@ -302,6 +299,7 @@ static irqreturn_t imx_keypad_irq_handler(int irq, void *dev_id)
writew(reg_val, keypad->mmio_base + KPSR);
if (keypad->enabled) {
+ pm_stay_awake(keypad->input_dev->dev.parent);
/* The matrix is supposed to be changed */
keypad->stable_count = 0;