Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits) sh: sh7785lcr: Map whole PCI address space. sh: Fix up DSP context save/restore. sh: Fix up number of on-chip DMA channels on SH7091. sh: update defconfigs. sh: Kill off broken direct-mapped cache mode. sh: Wire up ARCH_HAS_DEFAULT_IDLE for cpuidle. sh: Add a command line option for disabling I/O trapping. sh: Select ARCH_HIBERNATION_POSSIBLE. sh: migor: Fix up CEU use flags. input: migor_ts: add wakeup support rtc: rtc-sh: use set_irq_wake() input: sh_keysc: use enable/disable_irq_wake() sh: intc: set_irq_wake() support sh: intc: install enable, disable and shutdown callbacks clocksource: sh_cmt: use remove_irq() and remove clockevent workaround sh: ap325 and Migo-R use new sh_mobile_ceu_info flags sh: Fix up -Wformat-security whining. sh: ap325rxa: Add ov772x support, again. sh: Sanitize asm/mmu.h for assembly use. sh: Tidy up sh7786 pinmux table. ...
This commit is contained in:
@@ -795,10 +795,46 @@ static int __devexit sh_rtc_remove(struct platform_device *pdev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sh_rtc_set_irq_wake(struct device *dev, int enabled)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct sh_rtc *rtc = platform_get_drvdata(pdev);
|
||||
|
||||
set_irq_wake(rtc->periodic_irq, enabled);
|
||||
if (rtc->carry_irq > 0) {
|
||||
set_irq_wake(rtc->carry_irq, enabled);
|
||||
set_irq_wake(rtc->alarm_irq, enabled);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static int sh_rtc_suspend(struct device *dev)
|
||||
{
|
||||
if (device_may_wakeup(dev))
|
||||
sh_rtc_set_irq_wake(dev, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sh_rtc_resume(struct device *dev)
|
||||
{
|
||||
if (device_may_wakeup(dev))
|
||||
sh_rtc_set_irq_wake(dev, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dev_pm_ops sh_rtc_dev_pm_ops = {
|
||||
.suspend = sh_rtc_suspend,
|
||||
.resume = sh_rtc_resume,
|
||||
};
|
||||
|
||||
static struct platform_driver sh_rtc_platform_driver = {
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &sh_rtc_dev_pm_ops,
|
||||
},
|
||||
.probe = sh_rtc_probe,
|
||||
.remove = __devexit_p(sh_rtc_remove),
|
||||
|
Reference in New Issue
Block a user