diff options
author | Anson Huang <b20788@freescale.com> | 2013-10-14 15:19:20 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:05:48 -0400 |
commit | ee1e9ebaadb6a4afc214bf4e31b0c41bfe1cf71b (patch) | |
tree | 139cb0a4898654f47e3a3a27593343e67e9777b8 | |
parent | 987109d227c56f46bb90ac8a5ca0e6c280108dfb (diff) |
ENGR00283508-3 keyboard: imx: support pin sleep mode in suspend
When system suspend, need to switch keyboard pins to sleep mode,
this is to save IO power. Using pinctrl mode switch framework
to make it happen.
Signed-off-by: Anson Huang <b20788@freescale.com>
-rw-r--r-- | drivers/input/keyboard/imx_keypad.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 03c8cc5cb6c1..da0cd02b3f70 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Driver for the IMX keypad port. | 2 | * Driver for the IMX keypad port. |
3 | * Copyright (C) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> | 3 | * Copyright (C) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> |
4 | * Copyright (C) 2013 Freescale Semiconductor, Inc. | ||
4 | * | 5 | * |
5 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -553,6 +554,8 @@ static int imx_kbd_suspend(struct device *dev) | |||
553 | 554 | ||
554 | if (device_may_wakeup(&pdev->dev)) | 555 | if (device_may_wakeup(&pdev->dev)) |
555 | enable_irq_wake(kbd->irq); | 556 | enable_irq_wake(kbd->irq); |
557 | else | ||
558 | pinctrl_pm_select_sleep_state(dev); | ||
556 | 559 | ||
557 | return 0; | 560 | return 0; |
558 | } | 561 | } |
@@ -566,6 +569,8 @@ static int imx_kbd_resume(struct device *dev) | |||
566 | 569 | ||
567 | if (device_may_wakeup(&pdev->dev)) | 570 | if (device_may_wakeup(&pdev->dev)) |
568 | disable_irq_wake(kbd->irq); | 571 | disable_irq_wake(kbd->irq); |
572 | else | ||
573 | pinctrl_pm_select_default_state(dev); | ||
569 | 574 | ||
570 | mutex_lock(&input_dev->mutex); | 575 | mutex_lock(&input_dev->mutex); |
571 | 576 | ||