Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1229509

[PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag

From Sudeep Holla <sudeep.holla@arm.com>
Newsgroups linux.kernel
Subject [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
Date 2015-09-21 18:00 +0200
Message-ID <qbbFx-2I0-33@gated-at.bofh.it> (permalink)
References <qbbvQ-2wt-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The IRQF_NO_SUSPEND flag is used to identify the interrupts that should
be left enabled so as to allow them to work as expected during the
suspend-resume cycle, but doesn't guarantee that it will wake the system
from a suspended state, enable_irq_wake is recommended to be used for
the wakeup.

This patch removes the use of IRQF_NO_SUSPEND flags and uses newly
introduce PM wakeup APIs dev_pm_{set,clear}_wake_irq.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: rtc-linux@googlegroups.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/rtc/rtc-ab8500.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c
index 51407c4c7bd2..24a0af650a1b 100644
--- a/drivers/rtc/rtc-ab8500.c
+++ b/drivers/rtc/rtc-ab8500.c
@@ -18,6 +18,7 @@
 #include <linux/mfd/abx500/ab8500.h>
 #include <linux/delay.h>
 #include <linux/of.h>
+#include <linux/pm_wakeirq.h>
 
 #define AB8500_RTC_SOFF_STAT_REG	0x00
 #define AB8500_RTC_CC_CONF_REG		0x01
@@ -493,11 +494,12 @@ static int ab8500_rtc_probe(struct platform_device *pdev)
 	}
 
 	err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
-			rtc_alarm_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
+			rtc_alarm_handler, IRQF_ONESHOT,
 			"ab8500-rtc", rtc);
 	if (err < 0)
 		return err;
 
+	dev_pm_set_wake_irq(&pdev->dev, irq);
 	platform_set_drvdata(pdev, rtc);
 
 	err = ab8500_sysfs_rtc_register(&pdev->dev);
@@ -513,6 +515,8 @@ static int ab8500_rtc_probe(struct platform_device *pdev)
 
 static int ab8500_rtc_remove(struct platform_device *pdev)
 {
+	dev_pm_clear_wake_irq(&pdev->dev);
+	device_init_wakeup(&pdev->dev, false);
 	ab8500_sysfs_rtc_unregister(&pdev->dev);
 
 	return 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
  [PATCH 09/17] MIPS: ttyFDC: replace IRQF_NO_SUSPEND with IRQF_COND_SUSPEND Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
  [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
  [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
    Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Linus Walleij <linus.walleij@linaro.org> - 2015-10-02 12:50 +0200
    Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2015-10-03 17:30 +0200
  [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
    Re: [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Guenter Roeck <linux@roeck-us.net> - 2015-09-23 17:40 +0200
  [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
    Re: [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND  flag Darren Hart <dvhart@infradead.org> - 2015-10-03 18:10 +0200
  [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
    Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Thierry Reding <thierry.reding@gmail.com> - 2015-10-05 07:50 +0200
    Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Laxman Dewangan <ldewangan@nvidia.com> - 2015-10-05 12:40 +0200

csiph-web