Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107665
b: refs/heads/master
c: 5aeb776
h: refs/heads/master
i:
  107663: c153cf8
v: v3
  • Loading branch information
Sonic Zhang authored and Linus Torvalds committed Aug 5, 2008
1 parent d28528c commit 9baf287
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd279f6127c0f64dfb0055bc0adb97a284a08df3
refs/heads/master: 5aeb776d0c2bb1dd3ef01f4805929e2bc2923e7b
28 changes: 28 additions & 0 deletions trunk/drivers/rtc/rtc-bfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,41 @@ static int __devexit bfin_rtc_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{
#ifdef PM_WAKEUP_SIC_IWR
struct bfin_rtc *rtc = dev_get_drvdata(&pdev->dev);
#endif
bfin_rtc_reset(&pdev->dev);
#ifdef PM_WAKEUP_SIC_IWR
bfin_write_RTC_SWCNT(10);
bfin_rtc_int_set(rtc, RTC_ISTAT_STOPWATCH);
#endif
return 0;
}

static int bfin_rtc_resume(struct platform_device *pdev)
{
#ifdef PM_WAKEUP_SIC_IWR
struct bfin_rtc *rtc = dev_get_drvdata(&pdev->dev);
bfin_rtc_int_clear(rtc, RTC_ISTAT_STOPWATCH);
#endif
return 0;
}
#endif

static struct platform_driver bfin_rtc_driver = {
.driver = {
.name = "rtc-bfin",
.owner = THIS_MODULE,
},
.probe = bfin_rtc_probe,
.remove = __devexit_p(bfin_rtc_remove),
#ifdef CONFIG_PM
.suspend = bfin_rtc_suspend,
.resume = bfin_rtc_resume,
#endif
};

static int __init bfin_rtc_init(void)
Expand Down

0 comments on commit 9baf287

Please sign in to comment.