Skip to contentSkip to conversation

+ rtc-s5m-enable-irq-wake-during-suspend.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Dec 2, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: + rtc-s5m-enable-irq-wake-during-suspend.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
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 <[email protected]>
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.

Cc Mark Brown <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc Lee Jones <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Alessandro Zummo <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Kyungmin Park <[email protected]>

---

 drivers/rtc/rtc-s5m.c |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
drivers/rtc/rtc-s5m.c renamed from drivers/rtc/rtc-s5m.c~rtc-s5m-enable-irq-wake-during-suspend +25 -0
diff -puN drivers/rtc/rtc-s5m.c~rtc-s5m-enable-irq-wake-during-suspend 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 [email protected] 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