diff options
-rw-r--r-- | drivers/input/keyboard/bf54x-keys.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index 54ed8e2e1c02..f1d20817ef29 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 | * |
@@ -82,6 +82,9 @@ struct bf54x_kpad { | |||
82 | unsigned short *keycode; | 82 | unsigned short *keycode; |
83 | struct timer_list timer; | 83 | struct timer_list timer; |
84 | unsigned int keyup_test_jiffies; | 84 | unsigned int keyup_test_jiffies; |
85 | unsigned short kpad_msel; | ||
86 | unsigned short kpad_prescale; | ||
87 | unsigned short kpad_ctl; | ||
85 | }; | 88 | }; |
86 | 89 | ||
87 | static inline int bfin_kpad_find_key(struct bf54x_kpad *bf54x_kpad, | 90 | static inline int bfin_kpad_find_key(struct bf54x_kpad *bf54x_kpad, |
@@ -361,6 +364,10 @@ static int bfin_kpad_suspend(struct platform_device *pdev, pm_message_t state) | |||
361 | { | 364 | { |
362 | struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); | 365 | struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); |
363 | 366 | ||
367 | bf54x_kpad->kpad_msel = bfin_read_KPAD_MSEL(); | ||
368 | bf54x_kpad->kpad_prescale = bfin_read_KPAD_PRESCALE(); | ||
369 | bf54x_kpad->kpad_ctl = bfin_read_KPAD_CTL(); | ||
370 | |||
364 | if (device_may_wakeup(&pdev->dev)) | 371 | if (device_may_wakeup(&pdev->dev)) |
365 | enable_irq_wake(bf54x_kpad->irq); | 372 | enable_irq_wake(bf54x_kpad->irq); |
366 | 373 | ||
@@ -371,6 +378,10 @@ static int bfin_kpad_resume(struct platform_device *pdev) | |||
371 | { | 378 | { |
372 | struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); | 379 | struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); |
373 | 380 | ||
381 | bfin_write_KPAD_MSEL(bf54x_kpad->kpad_msel); | ||
382 | bfin_write_KPAD_PRESCALE(bf54x_kpad->kpad_prescale); | ||
383 | bfin_write_KPAD_CTL(bf54x_kpad->kpad_ctl); | ||
384 | |||
374 | if (device_may_wakeup(&pdev->dev)) | 385 | if (device_may_wakeup(&pdev->dev)) |
375 | disable_irq_wake(bf54x_kpad->irq); | 386 | disable_irq_wake(bf54x_kpad->irq); |
376 | 387 | ||