Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115060
b: refs/heads/master
c: 108fcb4
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Dmitry Torokhov committed Sep 10, 2008
1 parent a19ac5e commit 3dc7b93
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8c1f317d1b3bb5c21175550968c86acfab3ff36
refs/heads/master: 108fcb42c7bfd9ee205d1b8247813548705073b7
13 changes: 12 additions & 1 deletion trunk/drivers/input/keyboard/bf54x-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
*
* Modified:
* Copyright 2007 Analog Devices Inc.
* Copyright 2007-2008 Analog Devices Inc.
*
* Bugs: Enter bugs at http://blackfin.uclinux.org/
*
Expand Down Expand Up @@ -82,6 +82,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,
Expand Down Expand Up @@ -361,6 +364,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);

Expand All @@ -371,6 +378,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);

Expand Down

0 comments on commit 3dc7b93

Please sign in to comment.