summaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/bf54x-keys.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-10-15 23:29:12 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-10-15 23:29:12 -0400
commit4c0e799a9a6dc64426ddb6c03aea1a154357658f (patch)
tree2d9aa9493d80fceb178a63bf15bb3d9edfc5fbae /drivers/input/keyboard/bf54x-keys.c
parent3fa8749e584b55f1180411ab1b51117190bac1e5 (diff)
parentb8d055a878ee0f997ded40649701089d2486f850 (diff)
downloadblackbird-op-linux-4c0e799a9a6dc64426ddb6c03aea1a154357658f.tar.gz
blackbird-op-linux-4c0e799a9a6dc64426ddb6c03aea1a154357658f.zip
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/keyboard/bf54x-keys.c')
-rw-r--r--drivers/input/keyboard/bf54x-keys.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c
index e348cfccc17a..19284016e0f4 100644
--- a/drivers/input/keyboard/bf54x-keys.c
+++ b/drivers/input/keyboard/bf54x-keys.c
@@ -8,7 +8,7 @@
*
*
* Modified:
- * Copyright 2007 Analog Devices Inc.
+ * Copyright 2007-2008 Analog Devices Inc.
*
* Bugs: Enter bugs at http://blackfin.uclinux.org/
*
@@ -81,6 +81,9 @@ struct bf54x_kpad {
unsigned short *keycode;
struct timer_list timer;
unsigned int keyup_test_jiffies;
+ unsigned short kpad_msel;
+ unsigned short kpad_prescale;
+ unsigned short kpad_ctl;
};
static inline int bfin_kpad_find_key(struct bf54x_kpad *bf54x_kpad,
@@ -360,6 +363,10 @@ static int bfin_kpad_suspend(struct platform_device *pdev, pm_message_t state)
{
struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
+ bf54x_kpad->kpad_msel = bfin_read_KPAD_MSEL();
+ bf54x_kpad->kpad_prescale = bfin_read_KPAD_PRESCALE();
+ bf54x_kpad->kpad_ctl = bfin_read_KPAD_CTL();
+
if (device_may_wakeup(&pdev->dev))
enable_irq_wake(bf54x_kpad->irq);
@@ -370,6 +377,10 @@ static int bfin_kpad_resume(struct platform_device *pdev)
{
struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
+ bfin_write_KPAD_MSEL(bf54x_kpad->kpad_msel);
+ bfin_write_KPAD_PRESCALE(bf54x_kpad->kpad_prescale);
+ bfin_write_KPAD_CTL(bf54x_kpad->kpad_ctl);
+
if (device_may_wakeup(&pdev->dev))
disable_irq_wake(bf54x_kpad->irq);
OpenPOWER on IntegriCloud