diff options
author | Robin Gong <b38343@freescale.com> | 2014-06-10 11:56:49 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:25:26 +0800 |
commit | d9e976e0ad874ce4ac76da31f4efaeaf8fe7e150 (patch) | |
tree | e0ebcb9c697aae54d883aec05386102c7401c831 /drivers/input | |
parent | 093b900e278927f9b7e11eba9f1b917019b82b4f (diff) |
ENGR00318936-1 input: keyboard: imx: add pm_stay_awake and pm_relax
There is a small window after system suspend but timer scan function
didn't finish timely, in this case, system enter suspend without kpp
interrupt enabled and failed to resume back if key depressed.We add
pm_stay_awake and pm_relax to make sure system suspend flow abort in
this case.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 3868f06af8f39673f270643ada63dd88e2f5699e)
(cherry picked from commit 529dee44f7da0ad6d57a3e8ccd942af944f6723b)
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/imx_keypad.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 2165f3dd328b..6ed08015a345 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) 2014 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 @@ -302,6 +304,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; |