Subject: + rtc-s5m-enable-irq-wake-during-suspend.patch added to -mm tree To: k.kozlowski@xxxxxxxxxxx,a.zummo@xxxxxxxxxxxx,broonie@xxxxxxxxxx,geert@xxxxxxxxxxxxxx,kyungmin.park@xxxxxxxxxxx,lee.jones@xxxxxxxxxx,lgirdwood@xxxxxxxxx,m.szyprowski@xxxxxxxxxxx,sameo@xxxxxxxxxxxxxxx,sbkim73@xxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 02 Dec 2013 15:15:42 -0800 The patch titled Subject: rtc: s5m: enable IRQ wake during suspend has been added to the -mm tree. Its filename is rtc-s5m-enable-irq-wake-during-suspend.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/rtc-s5m-enable-irq-wake-during-suspend.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/rtc-s5m-enable-irq-wake-during-suspend.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx> Subject: rtc: s5m: enable IRQ wake during suspend Add PM suspend/resume ops to rtc-s5m driver and enable IRQ wake during suspend so the RTC would act like a wake up source. This allows waking up from suspend to RAM on RTC alarm interrupt. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> Cc: Mark Brown <broonie@xxxxxxxxxx> Acked-by: Sangbeom Kim <sbkim73@xxxxxxxxxxx> Cc: Samuel Ortiz <sameo@xxxxxxxxxxxxxxx> Cc: Lee Jones <lee.jones@xxxxxxxxxx> Cc: Liam Girdwood <lgirdwood@xxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-s5m.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff -puN drivers/rtc/rtc-s5m.c~rtc-s5m-enable-irq-wake-during-suspend drivers/rtc/rtc-s5m.c --- a/drivers/rtc/rtc-s5m.c~rtc-s5m-enable-irq-wake-during-suspend +++ a/drivers/rtc/rtc-s5m.c @@ -639,6 +639,30 @@ static void s5m_rtc_shutdown(struct plat s5m_rtc_enable_smpl(info, false); } +static int s5m_rtc_resume(struct device *dev) +{ + struct s5m_rtc_info *info = dev_get_drvdata(dev); + int ret = 0; + + if (device_may_wakeup(dev)) + ret = disable_irq_wake(info->irq); + + return ret; +} + +static int s5m_rtc_suspend(struct device *dev) +{ + struct s5m_rtc_info *info = dev_get_drvdata(dev); + int ret = 0; + + if (device_may_wakeup(dev)) + ret = enable_irq_wake(info->irq); + + return ret; +} + +static SIMPLE_DEV_PM_OPS(s5m_rtc_pm_ops, s5m_rtc_suspend, s5m_rtc_resume); + static const struct platform_device_id s5m_rtc_id[] = { { "s5m-rtc", 0 }, }; @@ -647,6 +671,7 @@ static struct platform_driver s5m_rtc_dr .driver = { .name = "s5m-rtc", .owner = THIS_MODULE, + .pm = &s5m_rtc_pm_ops, }, .probe = s5m_rtc_probe, .shutdown = s5m_rtc_shutdown, _ Patches currently in -mm which might be from k.kozlowski@xxxxxxxxxxx are mfd-rtc-s5m-fix-register-updating-by-adding-regmap-for-rtc.patch rtc-s5m-fix-unsuccesful-irq-request-during-probe.patch rtc-s5m-limit-endless-loop-waiting-for-register-update.patch rtc-s5m-enable-irq-wake-during-suspend.patch mfd-sec-constify-regmap-configs-and-regmap-irqs.patch swap-fix-setting-page_size-blocksize-during-swapoff-swapon-race.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html