diff options
author | Robin Gong <b38343@freescale.com> | 2014-06-10 11:56:49 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-01-15 21:17:52 -0600 |
commit | ecdbc2d2f63e51c8bc90bf127981d24912f0ab44 (patch) | |
tree | e9ac64218679d098111a6dd916a5789d92c0e6c8 /drivers/input/keyboard | |
parent | d16681123b6a7fc9d55206f970aa253d389c51bd (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)
Diffstat (limited to 'drivers/input/keyboard')
-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 cbf4f8038cba..ee0c752d3a5b 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 @@ -269,6 +270,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 @@ -304,6 +306,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; |