Signed-off-by: Kristen Carlson Accardi <[email protected]>
---
drivers/input/keyboard/intel_mid_keypad.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/intel_mid_keypad.c
b/drivers/input/keyboard/intel_mid_keypad.c
index 3c5b5cd..33c6300 100644
--- a/drivers/input/keyboard/intel_mid_keypad.c
+++ b/drivers/input/keyboard/intel_mid_keypad.c
@@ -426,14 +426,32 @@ static const struct pci_device_id keypad_pci_tbl[] = {
};
MODULE_DEVICE_TABLE(pci, keypad_pci_tbl);
+#ifdef CONFIG_PM
+static int mrst_keypad_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+ if (device_may_wakeup(&pdev->dev))
+ enable_irq_wake(pdev->irq);
+
+ return 0;
+}
+
+static int mrst_keypad_resume(struct pci_dev *pdev)
+{
+ if (device_may_wakeup(&pdev->dev))
+ disable_irq_wake(pdev->irq);
+
+ return 0;
+}
+#endif
+
static struct pci_driver mrst_keypad_driver = {
.name = DRV_NAME,
.id_table = keypad_pci_tbl,
.probe = mrst_keypad_probe,
.remove = __devexit_p(mrst_keypad_remove),
#ifdef CONFIG_PM
- .suspend = NULL,
- .resume = NULL,
+ .suspend = mrst_keypad_suspend,
+ .resume = mrst_keypad_resume,
#endif /* CONFIG_PM */
};
--
1.7.3.1
_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel