aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/bf54x-keys.c
diff options
context:
space:
mode:
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 @@
8 * 8 *
9 * 9 *
10 * Modified: 10 * Modified:
11 * Copyright 2007 Analog Devices Inc. 11 * Copyright 2007-2008 Analog Devices Inc.
12 * 12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 * 14 *
@@ -81,6 +81,9 @@ struct bf54x_kpad {
81 unsigned short *keycode; 81 unsigned short *keycode;
82 struct timer_list timer; 82 struct timer_list timer;
83 unsigned int keyup_test_jiffies; 83 unsigned int keyup_test_jiffies;
84 unsigned short kpad_msel;
85 unsigned short kpad_prescale;
86 unsigned short kpad_ctl;
84}; 87};
85 88
86static inline int bfin_kpad_find_key(struct bf54x_kpad *bf54x_kpad, 89static 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)
360{ 363{
361 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); 364 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
362 365
366 bf54x_kpad->kpad_msel = bfin_read_KPAD_MSEL();
367 bf54x_kpad->kpad_prescale = bfin_read_KPAD_PRESCALE();
368 bf54x_kpad->kpad_ctl = bfin_read_KPAD_CTL();
369
363 if (device_may_wakeup(&pdev->dev)) 370 if (device_may_wakeup(&pdev->dev))
364 enable_irq_wake(bf54x_kpad->irq); 371 enable_irq_wake(bf54x_kpad->irq);
365 372
@@ -370,6 +377,10 @@ static int bfin_kpad_resume(struct platform_device *pdev)
370{ 377{
371 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); 378 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev);
372 379
380 bfin_write_KPAD_MSEL(bf54x_kpad->kpad_msel);
381 bfin_write_KPAD_PRESCALE(bf54x_kpad->kpad_prescale);
382 bfin_write_KPAD_CTL(bf54x_kpad->kpad_ctl);
383
373 if (device_may_wakeup(&pdev->dev)) 384 if (device_may_wakeup(&pdev->dev))
374 disable_irq_wake(bf54x_kpad->irq); 385 disable_irq_wake(bf54x_kpad->irq);
375 386