All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag
@ 2015-09-21 15:46 Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
                   ` (16 more replies)
  0 siblings, 17 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:46 UTC (permalink / raw)
  To: linux-pm, linux-kernel; +Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki

Hi,

As discussed in under the topic "Wakeup sources configuration and
management" in LPC PM microconference @ Seattle[1], this is the first
set of changes to remove the mis/ab-use of IRQF_NO_SUSPEND for wakeup
IRQ configuration. This list is not complete, there are few more usages
that can be removed.

Regards,
Sudeep

[1] http://www.linuxplumbersconf.org/2015/ocw//system/presentations/3051/original/wakeup_config.pdf

Sudeep Holla (17):
  rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
  rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
  input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant
    mpic_irq_set_wake
  platform: x86: remove misuse of IRQF_NO_SUSPEND flag
  rtc: ds1343: remove misuse of IRQF_NO_SUSPEND flag
  input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  hwmon: abx500: drop the use of IRQF_NO_SUSPEND
  MIPS: ttyFDC: replace IRQF_NO_SUSPEND with IRQF_COND_SUSPEND
  tty/serial: st-asc: drop the use of IRQF_NO_SUSPEND
  pm: bf609: remove misuse of IRQF_NO_SUSPEND flag
  ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
  net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  media: st-rc: remove misuse of IRQF_NO_SUSPEND flag
  ir-hix5hd2: drop the use of IRQF_NO_SUSPEND
  pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag
  mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND

 arch/arm/mach-omap2/mux.c                 |  4 ++--
 arch/arm/mach-omap2/pm34xx.c              |  9 ++++-----
 arch/blackfin/mach-bf609/pm.c             | 13 +++++++------
 arch/powerpc/sysdev/mpic.c                | 23 ++++-------------------
 drivers/hwmon/abx500.c                    |  2 +-
 drivers/input/keyboard/tegra-kbc.c        |  2 +-
 drivers/media/rc/ir-hix5hd2.c             |  2 +-
 drivers/media/rc/st_rc.c                  | 14 +++++++++-----
 drivers/mfd/ab8500-core.c                 | 11 +++++++++--
 drivers/mfd/ab8500-debugfs.c              |  2 +-
 drivers/mfd/ab8500-gpadc.c                | 15 +++++++++++----
 drivers/mfd/db8500-prcmu.c                | 24 +++++++++++++++++-------
 drivers/mfd/qcom_rpm.c                    |  2 +-
 drivers/net/ethernet/freescale/gianfar.c  |  9 +++++----
 drivers/pinctrl/pinctrl-single.c          |  7 ++++---
 drivers/platform/x86/intel_mid_powerbtn.c | 10 ++++++++--
 drivers/power/ab8500_btemp.c              |  6 ++++--
 drivers/power/ab8500_charger.c            |  6 ++++--
 drivers/power/ab8500_fg.c                 |  9 ++++++---
 drivers/rtc/rtc-ab8500.c                  |  6 +++++-
 drivers/rtc/rtc-ds1343.c                  |  9 ++++++---
 drivers/rtc/rtc-pl031.c                   | 13 ++++++++-----
 drivers/thermal/db8500_thermal.c          |  5 ++---
 drivers/tty/mips_ejtag_fdc.c              |  4 ++--
 drivers/tty/serial/st-asc.c               |  2 +-
 drivers/tty/serial/stm32-usart.c          |  3 +--
 drivers/usb/phy/phy-ab8500-usb.c          | 10 ++++++----
 27 files changed, 130 insertions(+), 92 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-09-21 15:46   ` Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
                     ` (15 subsequent siblings)
  16 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:46 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Linus Walleij,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

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-pl031.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index 41dcb7ddb906..e1687e19c59f 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/bcd.h>
 #include <linux/delay.h>
+#include <linux/pm_wakeirq.h>
 #include <linux/slab.h>
 
 /*
@@ -305,6 +306,8 @@ static int pl031_remove(struct amba_device *adev)
 {
 	struct pl031_local *ldata = dev_get_drvdata(&adev->dev);
 
+	dev_pm_clear_wake_irq(&adev->dev);
+	device_init_wakeup(&adev->dev, false);
 	free_irq(adev->irq[0], ldata);
 	rtc_device_unregister(ldata->rtc);
 	iounmap(ldata->base);
@@ -370,7 +373,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
 		}
 	}
 
-	device_init_wakeup(&adev->dev, 1);
+	device_init_wakeup(&adev->dev, true);
 	ldata->rtc = rtc_device_register("pl031", &adev->dev, ops,
 					THIS_MODULE);
 	if (IS_ERR(ldata->rtc)) {
@@ -383,7 +386,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
 		ret = -EIO;
 		goto out_no_irq;
 	}
-
+	dev_pm_set_wake_irq(&adev->dev, adev->irq[0]);
 	return 0;
 
 out_no_irq:
@@ -408,7 +411,6 @@ static struct pl031_vendor_data arm_pl031 = {
 		.set_alarm = pl031_set_alarm,
 		.alarm_irq_enable = pl031_alarm_irq_enable,
 	},
-	.irqflags = IRQF_NO_SUSPEND,
 };
 
 /* The First ST derivative */
@@ -422,7 +424,6 @@ static struct pl031_vendor_data stv1_pl031 = {
 	},
 	.clockwatch = true,
 	.st_weekday = true,
-	.irqflags = IRQF_NO_SUSPEND,
 };
 
 /* And the second ST derivative */
@@ -439,8 +440,10 @@ static struct pl031_vendor_data stv2_pl031 = {
 	/*
 	 * This variant shares the IRQ with another block and must not
 	 * suspend that IRQ line.
+	 * TODO check if it shares with IRQF_NO_SUSPEND user, else we can
+	 * remove IRQF_COND_SUSPEND
 	 */
-	.irqflags = IRQF_SHARED | IRQF_NO_SUSPEND,
+	.irqflags = IRQF_SHARED | IRQF_COND_SUSPEND,
 };
 
 static struct amba_id pl031_ids[] = {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [rtc-linux] [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-09-21 15:46   ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:46 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Linus Walleij,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

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-pl031.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index 41dcb7ddb906..e1687e19c59f 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/bcd.h>
 #include <linux/delay.h>
+#include <linux/pm_wakeirq.h>
 #include <linux/slab.h>
 
 /*
@@ -305,6 +306,8 @@ static int pl031_remove(struct amba_device *adev)
 {
 	struct pl031_local *ldata = dev_get_drvdata(&adev->dev);
 
+	dev_pm_clear_wake_irq(&adev->dev);
+	device_init_wakeup(&adev->dev, false);
 	free_irq(adev->irq[0], ldata);
 	rtc_device_unregister(ldata->rtc);
 	iounmap(ldata->base);
@@ -370,7 +373,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
 		}
 	}
 
-	device_init_wakeup(&adev->dev, 1);
+	device_init_wakeup(&adev->dev, true);
 	ldata->rtc = rtc_device_register("pl031", &adev->dev, ops,
 					THIS_MODULE);
 	if (IS_ERR(ldata->rtc)) {
@@ -383,7 +386,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
 		ret = -EIO;
 		goto out_no_irq;
 	}
-
+	dev_pm_set_wake_irq(&adev->dev, adev->irq[0]);
 	return 0;
 
 out_no_irq:
@@ -408,7 +411,6 @@ static struct pl031_vendor_data arm_pl031 = {
 		.set_alarm = pl031_set_alarm,
 		.alarm_irq_enable = pl031_alarm_irq_enable,
 	},
-	.irqflags = IRQF_NO_SUSPEND,
 };
 
 /* The First ST derivative */
@@ -422,7 +424,6 @@ static struct pl031_vendor_data stv1_pl031 = {
 	},
 	.clockwatch = true,
 	.st_weekday = true,
-	.irqflags = IRQF_NO_SUSPEND,
 };
 
 /* And the second ST derivative */
@@ -439,8 +440,10 @@ static struct pl031_vendor_data stv2_pl031 = {
 	/*
 	 * This variant shares the IRQ with another block and must not
 	 * suspend that IRQ line.
+	 * TODO check if it shares with IRQF_NO_SUSPEND user, else we can
+	 * remove IRQF_COND_SUSPEND
 	 */
-	.irqflags = IRQF_SHARED | IRQF_NO_SUSPEND,
+	.irqflags = IRQF_SHARED | IRQF_COND_SUSPEND,
 };
 
 static struct amba_id pl031_ids[] = {
-- 
1.9.1

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-09-21 15:46   ` Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
                     ` (15 subsequent siblings)
  16 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:46 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Linus Walleij,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

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


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [rtc-linux] [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-09-21 15:46   ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:46 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Linus Walleij,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

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

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
@ 2015-09-21 15:46 ` Sudeep Holla
  2015-10-05  5:44   ` Thierry Reding
  2015-10-05 10:24     ` Laxman Dewangan
  2015-09-21 15:47 ` [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake Sudeep Holla
                   ` (13 subsequent siblings)
  16 siblings, 2 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:46 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Laxman Dewangan, Stephen Warren, Thierry Reding, linux-input,
	linux-tegra

The driver handles wakeup irq correctly using device_init_wakeup and
enable_irq_wake. There's no need to use IRQF_NO_SUSPEND while registering
the interrupt.

This patch removes the use of IRQF_NO_SUSPEND flag.

Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/input/keyboard/tegra-kbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index f97c73bd14f8..5f5dbbd51991 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -705,7 +705,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)
 	input_set_drvdata(kbc->idev, kbc);
 
 	err = devm_request_irq(&pdev->dev, kbc->irq, tegra_kbc_isr,
-			  IRQF_NO_SUSPEND | IRQF_TRIGGER_HIGH, pdev->name, kbc);
+			       IRQF_TRIGGER_HIGH, pdev->name, kbc);
 	if (err) {
 		dev_err(&pdev->dev, "failed to request keyboard IRQ\n");
 		return err;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (2 preceding siblings ...)
  2015-09-21 15:46 ` [PATCH 03/17] input: tegra-kbc: drop use " Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-09-22 23:50     ` Scott Wood
  2015-09-23  4:06     ` Scott Wood
  2015-09-21 15:47 ` [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (12 subsequent siblings)
  16 siblings, 2 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Scott Wood, Hongtao Jia, Marc Zyngier, linuxppc-dev

mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
as it doesn't guarantee wakeup for that interrupt.

This patch removes the redundant mpic_irq_set_wake and sets the
IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Hongtao Jia <hongtao.jia@freescale.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 arch/powerpc/sysdev/mpic.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 537e5db85a06..123e43612f0a 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -924,22 +924,6 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type)
 	return IRQ_SET_MASK_OK_NOCOPY;
 }
 
-static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
-{
-	struct irq_desc *desc = container_of(d, struct irq_desc, irq_data);
-	struct mpic *mpic = mpic_from_irq_data(d);
-
-	if (!(mpic->flags & MPIC_FSL))
-		return -ENXIO;
-
-	if (on)
-		desc->action->flags |= IRQF_NO_SUSPEND;
-	else
-		desc->action->flags &= ~IRQF_NO_SUSPEND;
-
-	return 0;
-}
-
 void mpic_set_vector(unsigned int virq, unsigned int vector)
 {
 	struct mpic *mpic = mpic_from_irq(virq);
@@ -977,7 +961,6 @@ static struct irq_chip mpic_irq_chip = {
 	.irq_unmask	= mpic_unmask_irq,
 	.irq_eoi	= mpic_end_irq,
 	.irq_set_type	= mpic_set_irq_type,
-	.irq_set_wake	= mpic_irq_set_wake,
 };
 
 #ifdef CONFIG_SMP
@@ -992,7 +975,6 @@ static struct irq_chip mpic_tm_chip = {
 	.irq_mask	= mpic_mask_tm,
 	.irq_unmask	= mpic_unmask_tm,
 	.irq_eoi	= mpic_end_irq,
-	.irq_set_wake	= mpic_irq_set_wake,
 };
 
 #ifdef CONFIG_MPIC_U3_HT_IRQS
@@ -1283,8 +1265,11 @@ struct mpic * __init mpic_alloc(struct device_node *node,
 		flags |= MPIC_NO_RESET;
 	if (of_get_property(node, "single-cpu-affinity", NULL))
 		flags |= MPIC_SINGLE_DEST_CPU;
-	if (of_device_is_compatible(node, "fsl,mpic"))
+	if (of_device_is_compatible(node, "fsl,mpic")) {
 		flags |= MPIC_FSL | MPIC_LARGE_VECTORS;
+		mpic_irq_chip.flags |= IRQCHIP_SKIP_SET_WAKE;
+		mpic_tm_chip.flags |= IRQCHIP_SKIP_SET_WAKE;
+	}
 
 	mpic = kzalloc(sizeof(struct mpic), GFP_KERNEL);
 	if (mpic == NULL)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (3 preceding siblings ...)
  2015-09-21 15:47 ` [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-10-03 16:09   ` Darren Hart
  2015-09-21 15:47   ` [rtc-linux] " Sudeep Holla
                   ` (11 subsequent siblings)
  16 siblings, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Darren Hart,
	platform-driver-x86

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: Darren Hart <dvhart@infradead.org>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/platform/x86/intel_mid_powerbtn.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel_mid_powerbtn.c b/drivers/platform/x86/intel_mid_powerbtn.c
index 22606d6b2af3..1fc0de870ff8 100644
--- a/drivers/platform/x86/intel_mid_powerbtn.c
+++ b/drivers/platform/x86/intel_mid_powerbtn.c
@@ -24,6 +24,7 @@
 #include <linux/platform_device.h>
 #include <linux/input.h>
 #include <linux/mfd/intel_msic.h>
+#include <linux/pm_wakeirq.h>
 
 #define DRIVER_NAME "msic_power_btn"
 
@@ -76,14 +77,17 @@ static int mfld_pb_probe(struct platform_device *pdev)
 
 	input_set_capability(input, EV_KEY, KEY_POWER);
 
-	error = request_threaded_irq(irq, NULL, mfld_pb_isr, IRQF_NO_SUSPEND,
-			DRIVER_NAME, input);
+	error = request_threaded_irq(irq, NULL, mfld_pb_isr, 0,
+				     DRIVER_NAME, input);
 	if (error) {
 		dev_err(&pdev->dev, "Unable to request irq %d for mfld power"
 				"button\n", irq);
 		goto err_free_input;
 	}
 
+	device_init_wakeup(&pdev->dev, true);
+	dev_pm_set_wake_irq(&pdev->dev, irq);
+
 	error = input_register_device(input);
 	if (error) {
 		dev_err(&pdev->dev, "Unable to register input dev, error "
@@ -124,6 +128,8 @@ static int mfld_pb_remove(struct platform_device *pdev)
 	struct input_dev *input = platform_get_drvdata(pdev);
 	int irq = platform_get_irq(pdev, 0);
 
+	dev_pm_clear_wake_irq(&pdev->dev);
+	device_init_wakeup(&pdev->dev, false);
 	free_irq(irq, input);
 	input_unregister_device(input);
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 06/17] rtc: ds1343: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-09-21 15:47   ` Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
                     ` (15 subsequent siblings)
  16 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

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: 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-ds1343.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c
index 79a06dd3c185..615ce5c370eb 100644
--- a/drivers/rtc/rtc-ds1343.c
+++ b/drivers/rtc/rtc-ds1343.c
@@ -21,6 +21,7 @@
 #include <linux/rtc.h>
 #include <linux/bcd.h>
 #include <linux/pm.h>
+#include <linux/pm_wakeirq.h>
 #include <linux/slab.h>
 
 #define DS1343_DRV_VERSION	"01.00"
@@ -663,15 +664,15 @@ static int ds1343_probe(struct spi_device *spi)
 
 	if (priv->irq >= 0) {
 		res = devm_request_threaded_irq(&spi->dev, spi->irq, NULL,
-						ds1343_thread,
-						IRQF_NO_SUSPEND | IRQF_ONESHOT,
+						ds1343_thread, IRQF_ONESHOT,
 						"ds1343", priv);
 		if (res) {
 			priv->irq = -1;
 			dev_err(&spi->dev,
 				"unable to request irq for rtc ds1343\n");
 		} else {
-			device_set_wakeup_capable(&spi->dev, 1);
+			device_init_wakeup(&spi->dev, true);
+			dev_pm_set_wake_irq(&spi->dev, spi->irq);
 		}
 	}
 
@@ -692,6 +693,8 @@ static int ds1343_remove(struct spi_device *spi)
 		priv->irqen &= ~RTC_AF;
 		mutex_unlock(&priv->mutex);
 
+		dev_pm_clear_wake_irq(&spi->dev);
+		device_init_wakeup(&spi->dev, false);
 		devm_free_irq(&spi->dev, spi->irq, priv);
 	}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [rtc-linux] [PATCH 06/17] rtc: ds1343: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-09-21 15:47   ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

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: 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-ds1343.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c
index 79a06dd3c185..615ce5c370eb 100644
--- a/drivers/rtc/rtc-ds1343.c
+++ b/drivers/rtc/rtc-ds1343.c
@@ -21,6 +21,7 @@
 #include <linux/rtc.h>
 #include <linux/bcd.h>
 #include <linux/pm.h>
+#include <linux/pm_wakeirq.h>
 #include <linux/slab.h>
 
 #define DS1343_DRV_VERSION	"01.00"
@@ -663,15 +664,15 @@ static int ds1343_probe(struct spi_device *spi)
 
 	if (priv->irq >= 0) {
 		res = devm_request_threaded_irq(&spi->dev, spi->irq, NULL,
-						ds1343_thread,
-						IRQF_NO_SUSPEND | IRQF_ONESHOT,
+						ds1343_thread, IRQF_ONESHOT,
 						"ds1343", priv);
 		if (res) {
 			priv->irq = -1;
 			dev_err(&spi->dev,
 				"unable to request irq for rtc ds1343\n");
 		} else {
-			device_set_wakeup_capable(&spi->dev, 1);
+			device_init_wakeup(&spi->dev, true);
+			dev_pm_set_wake_irq(&spi->dev, spi->irq);
 		}
 	}
 
@@ -692,6 +693,8 @@ static int ds1343_remove(struct spi_device *spi)
 		priv->irqen &= ~RTC_AF;
 		mutex_unlock(&priv->mutex);
 
+		dev_pm_clear_wake_irq(&spi->dev);
+		device_init_wakeup(&spi->dev, false);
 		devm_free_irq(&spi->dev, spi->irq, priv);
 	}
 
-- 
1.9.1

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 07/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (5 preceding siblings ...)
  2015-09-21 15:47   ` [rtc-linux] " Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-09-21 23:21   ` Lee Jones
  2015-09-25 12:39   ` [PATCH 07/17][UPDATE] mfd: qcom_rpm: Drop " Sudeep Holla
  2015-09-21 15:47 ` [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Sudeep Holla
                   ` (9 subsequent siblings)
  16 siblings, 2 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Samuel Ortiz,
	Lee Jones

The driver handles wakeup irq correctly using irq_set_irq_wake. There's
no need to use IRQF_NO_SUSPEND while registering the interrupt.

This patch removes the use of IRQF_NO_SUSPEND flag.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/mfd/qcom_rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c
index 6afc9fabd94c..207a3bd68559 100644
--- a/drivers/mfd/qcom_rpm.c
+++ b/drivers/mfd/qcom_rpm.c
@@ -550,7 +550,7 @@ static int qcom_rpm_probe(struct platform_device *pdev)
 	ret = devm_request_irq(&pdev->dev,
 			       irq_ack,
 			       qcom_rpm_ack_interrupt,
-			       IRQF_TRIGGER_RISING | IRQF_NO_SUSPEND,
+			       IRQF_TRIGGER_RISING,
 			       "qcom_rpm_ack",
 			       rpm);
 	if (ret) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (6 preceding siblings ...)
  2015-09-21 15:47 ` [PATCH 07/17] input: tegra-kbc: drop use " Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-09-23 15:32   ` Guenter Roeck
  2015-09-21 15:47 ` [PATCH 09/17] MIPS: ttyFDC: replace IRQF_NO_SUSPEND with IRQF_COND_SUSPEND Sudeep Holla
                   ` (8 subsequent siblings)
  16 siblings, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Jean Delvare,
	Guenter Roeck, lm-sensors

The description in the driver states: "ABX500 does not provide auto ADC,
so to monitor the required temperatures, a periodic work is used. It is
more important to not wake up the CPU... If the chip gets too hot during
a sleep state it's most likely due to external factors, such as the
surrounding temperature and nothing can be done in S/W."

So it makes no sense to keep IRQs enabled as it need not be wakeup
source. This patch removes the use of IRQF_NO_SUSPEND flag

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/hwmon/abx500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c
index 6cb89c0ebab6..dcab258f60c1 100644
--- a/drivers/hwmon/abx500.c
+++ b/drivers/hwmon/abx500.c
@@ -377,7 +377,7 @@ static int setup_irqs(struct platform_device *pdev)
 	}
 
 	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
-		abx500_temp_irq_handler, IRQF_NO_SUSPEND, "abx500-temp", pdev);
+		abx500_temp_irq_handler, 0, "abx500-temp", pdev);
 	if (ret < 0)
 		dev_err(&pdev->dev, "Request threaded irq failed (%d)\n", ret);
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 09/17] MIPS: ttyFDC: replace IRQF_NO_SUSPEND with IRQF_COND_SUSPEND
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (7 preceding siblings ...)
  2015-09-21 15:47 ` [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-09-21 15:47   ` Sudeep Holla
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Greg Kroah-Hartman, Jiri Slaby

Since the FD interrupt handler can discern spurious IRQs and it is
shared with timer interrupt, use IRQF_COND_SUSPEND instead of
IRQF_NO_SUSPEND.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/tty/mips_ejtag_fdc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index a8c8cfd52a23..5a6d0b5cd18b 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -977,7 +977,7 @@ static int mips_ejtag_fdc_tty_probe(struct mips_cdmm_device *dev)
 	/* Try requesting the IRQ */
 	if (priv->irq >= 0) {
 		/*
-		 * IRQF_SHARED, IRQF_NO_SUSPEND: The FDC IRQ may be shared with
+		 * IRQF_SHARED, IRQF_COND_SUSPEND: The FDC IRQ may be shared with
 		 * other local interrupts such as the timer which sets
 		 * IRQF_TIMER (including IRQF_NO_SUSPEND).
 		 *
@@ -987,7 +987,7 @@ static int mips_ejtag_fdc_tty_probe(struct mips_cdmm_device *dev)
 		 */
 		ret = devm_request_irq(priv->dev, priv->irq, mips_ejtag_fdc_isr,
 				       IRQF_PERCPU | IRQF_SHARED |
-				       IRQF_NO_THREAD | IRQF_NO_SUSPEND,
+				       IRQF_NO_THREAD | IRQF_COND_SUSPEND,
 				       priv->fdc_name, priv);
 		if (ret)
 			priv->irq = -1;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 10/17] tty/serial: st-asc: drop the use of IRQF_NO_SUSPEND
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-09-21 15:47   ` Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
                     ` (15 subsequent siblings)
  16 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Srinivas Kandagatla, Maxime Coquelin, Greg Kroah-Hartman,
	linux-arm-kernel, kernel, linux-serial

These drivers doesn't claim the serial device to be wakeup source. Even
if it is, it needs to use enable_irq_wake or other related PM wakeup
APIs to enable it.

This patch removes yet another misuse of IRQF_NO_SUSPEND.

Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kernel@stlinux.com
Cc: linux-serial@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/tty/serial/st-asc.c      | 2 +-
 drivers/tty/serial/stm32-usart.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index d625664ce1b5..2d78cb3627ae 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -430,7 +430,7 @@ static void asc_break_ctl(struct uart_port *port, int break_state)
  */
 static int asc_startup(struct uart_port *port)
 {
-	if (request_irq(port->irq, asc_interrupt, IRQF_NO_SUSPEND,
+	if (request_irq(port->irq, asc_interrupt, 0,
 			asc_port_name(port), port)) {
 		dev_err(port->dev, "cannot allocate irq.\n");
 		return -ENODEV;
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index e3de9c6d2226..f89d1f79be18 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -322,8 +322,7 @@ static int stm32_startup(struct uart_port *port)
 	u32 val;
 	int ret;
 
-	ret = request_irq(port->irq, stm32_interrupt, IRQF_NO_SUSPEND,
-			  name, port);
+	ret = request_irq(port->irq, stm32_interrupt, 0, name, port);
 	if (ret)
 		return ret;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 10/17] tty/serial: st-asc: drop the use of IRQF_NO_SUSPEND
@ 2015-09-21 15:47   ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

These drivers doesn't claim the serial device to be wakeup source. Even
if it is, it needs to use enable_irq_wake or other related PM wakeup
APIs to enable it.

This patch removes yet another misuse of IRQF_NO_SUSPEND.

Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arm-kernel at lists.infradead.org
Cc: kernel at stlinux.com
Cc: linux-serial at vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/tty/serial/st-asc.c      | 2 +-
 drivers/tty/serial/stm32-usart.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index d625664ce1b5..2d78cb3627ae 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -430,7 +430,7 @@ static void asc_break_ctl(struct uart_port *port, int break_state)
  */
 static int asc_startup(struct uart_port *port)
 {
-	if (request_irq(port->irq, asc_interrupt, IRQF_NO_SUSPEND,
+	if (request_irq(port->irq, asc_interrupt, 0,
 			asc_port_name(port), port)) {
 		dev_err(port->dev, "cannot allocate irq.\n");
 		return -ENODEV;
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index e3de9c6d2226..f89d1f79be18 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -322,8 +322,7 @@ static int stm32_startup(struct uart_port *port)
 	u32 val;
 	int ret;
 
-	ret = request_irq(port->irq, stm32_interrupt, IRQF_NO_SUSPEND,
-			  name, port);
+	ret = request_irq(port->irq, stm32_interrupt, 0, name, port);
 	if (ret)
 		return ret;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 11/17] pm: bf609: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (9 preceding siblings ...)
  2015-09-21 15:47   ` Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-10-19 17:38     ` Sudeep Holla
  2015-09-21 15:47   ` Sudeep Holla
                   ` (5 subsequent siblings)
  16 siblings, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Steven Miao,
	adi-buildroot-devel

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 replacing it with
enable_irq_wake instead.

Cc: Steven Miao <realmz6@gmail.com>
Cc: adi-buildroot-devel@lists.sourceforge.net
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 arch/blackfin/mach-bf609/pm.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/blackfin/mach-bf609/pm.c b/arch/blackfin/mach-bf609/pm.c
index b1bfcf434d16..dab42d39b085 100644
--- a/arch/blackfin/mach-bf609/pm.c
+++ b/arch/blackfin/mach-bf609/pm.c
@@ -338,21 +338,22 @@ static int __init bf609_init_pm(void)
 				GPIO_PE12, error);
 	}
 
-	error = request_irq(irq, test_isr, IRQF_TRIGGER_RISING | IRQF_NO_SUSPEND
-				| IRQF_FORCE_RESUME, "gpiope12", NULL);
+	error = request_irq(irq, test_isr, IRQF_TRIGGER_RISING,
+			    "gpiope12", NULL);
 	if(error < 0)
 		printk(KERN_DEBUG "Unable to get irq\n");
+	enable_irq_wake(irq);
 #endif
 
-	error = request_irq(IRQ_CGU_EVT, dpm0_isr, IRQF_NO_SUSPEND |
-				IRQF_FORCE_RESUME, "cgu0 event", NULL);
+	error = request_irq(IRQ_CGU_EVT, dpm0_isr, 0, "cgu0 event", NULL);
 	if(error < 0)
 		printk(KERN_DEBUG "Unable to get irq\n");
+	enable_irq_wake(IRQ_CGU_EVT);
 
-	error = request_irq(IRQ_DPM, dpm0_isr, IRQF_NO_SUSPEND |
-				IRQF_FORCE_RESUME, "dpm0 event", NULL);
+	error = request_irq(IRQ_DPM, dpm0_isr, 0, "dpm0 event", NULL);
 	if (error < 0)
 		printk(KERN_DEBUG "Unable to get irq\n");
+	enable_irq_wake(IRQ_DPM);
 
 	bfin_cpu_pm = &bf609_cpu_pm;
 	return 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-09-21 15:47   ` Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
                     ` (15 subsequent siblings)
  16 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Tony Lindgren,
	Kevin Hilman, linux-omap, linux-arm-kernel

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 replacing it with
enable_irq_wake instead.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 arch/arm/mach-omap2/mux.c    | 4 ++--
 arch/arm/mach-omap2/pm34xx.c | 9 ++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 176eef6ef338..12012bef8e63 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -810,13 +810,13 @@ int __init omap_mux_late_init(void)
 		return 0;
 
 	ret = request_irq(omap_prcm_event_to_irq("io"),
-		omap_hwmod_mux_handle_irq, IRQF_SHARED | IRQF_NO_SUSPEND,
+		omap_hwmod_mux_handle_irq, IRQF_SHARED,
 			"hwmod_io", omap_mux_late_init);
 
 	if (ret)
 		pr_warn("mux: Failed to setup hwmod io irq %d\n", ret);
 
-	return 0;
+	return enable_irq_wake(omap_prcm_event_to_irq("io"));
 }
 
 static void __init omap_mux_package_fixup(struct omap_mux *p,
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 87b98bf92366..4b7ac7cd633a 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -472,23 +472,22 @@ int __init omap3_pm_init(void)
 	prcm_setup_regs();
 
 	ret = request_irq(omap_prcm_event_to_irq("wkup"),
-		_prcm_int_handle_wakeup, IRQF_NO_SUSPEND, "pm_wkup", NULL);
+		_prcm_int_handle_wakeup, 0, "pm_wkup", NULL);
 
 	if (ret) {
 		pr_err("pm: Failed to request pm_wkup irq\n");
 		goto err1;
 	}
+	enable_irq_wake(omap_prcm_event_to_irq("wkup"));
 
 	/* IO interrupt is shared with mux code */
 	ret = request_irq(omap_prcm_event_to_irq("io"),
-		_prcm_int_handle_io, IRQF_SHARED | IRQF_NO_SUSPEND, "pm_io",
-		omap3_pm_init);
-	enable_irq(omap_prcm_event_to_irq("io"));
-
+		_prcm_int_handle_io, IRQF_SHARED, "pm_io", omap3_pm_init);
 	if (ret) {
 		pr_err("pm: Failed to request pm_io irq\n");
 		goto err2;
 	}
+	enable_irq_wake(omap_prcm_event_to_irq("io"));
 
 	ret = pwrdm_for_each(pwrdms_setup, NULL);
 	if (ret) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-09-21 15:47   ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

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 replacing it with
enable_irq_wake instead.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: linux-omap at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 arch/arm/mach-omap2/mux.c    | 4 ++--
 arch/arm/mach-omap2/pm34xx.c | 9 ++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 176eef6ef338..12012bef8e63 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -810,13 +810,13 @@ int __init omap_mux_late_init(void)
 		return 0;
 
 	ret = request_irq(omap_prcm_event_to_irq("io"),
-		omap_hwmod_mux_handle_irq, IRQF_SHARED | IRQF_NO_SUSPEND,
+		omap_hwmod_mux_handle_irq, IRQF_SHARED,
 			"hwmod_io", omap_mux_late_init);
 
 	if (ret)
 		pr_warn("mux: Failed to setup hwmod io irq %d\n", ret);
 
-	return 0;
+	return enable_irq_wake(omap_prcm_event_to_irq("io"));
 }
 
 static void __init omap_mux_package_fixup(struct omap_mux *p,
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 87b98bf92366..4b7ac7cd633a 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -472,23 +472,22 @@ int __init omap3_pm_init(void)
 	prcm_setup_regs();
 
 	ret = request_irq(omap_prcm_event_to_irq("wkup"),
-		_prcm_int_handle_wakeup, IRQF_NO_SUSPEND, "pm_wkup", NULL);
+		_prcm_int_handle_wakeup, 0, "pm_wkup", NULL);
 
 	if (ret) {
 		pr_err("pm: Failed to request pm_wkup irq\n");
 		goto err1;
 	}
+	enable_irq_wake(omap_prcm_event_to_irq("wkup"));
 
 	/* IO interrupt is shared with mux code */
 	ret = request_irq(omap_prcm_event_to_irq("io"),
-		_prcm_int_handle_io, IRQF_SHARED | IRQF_NO_SUSPEND, "pm_io",
-		omap3_pm_init);
-	enable_irq(omap_prcm_event_to_irq("io"));
-
+		_prcm_int_handle_io, IRQF_SHARED, "pm_io", omap3_pm_init);
 	if (ret) {
 		pr_err("pm: Failed to request pm_io irq\n");
 		goto err2;
 	}
+	enable_irq_wake(omap_prcm_event_to_irq("io"));
 
 	ret = pwrdm_for_each(pwrdms_setup, NULL);
 	if (ret) {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (11 preceding siblings ...)
  2015-09-21 15:47   ` Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-09-21 16:24   ` Manoil Claudiu
  2015-09-24 21:23   ` David Miller
  2015-09-21 15:47   ` Sudeep Holla
                   ` (3 subsequent siblings)
  16 siblings, 2 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	David S. Miller, Claudiu Manoil, Kevin Hao, netdev

The device is set as wakeup capable using proper wakeup API but the
driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
which is incorrect.

This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
enable_irq_wake instead.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: Kevin Hao <haokexin@gmail.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 4b69d061d90f..803ed4c93503 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -1970,8 +1970,7 @@ static int register_grp_irqs(struct gfar_priv_grp *grp)
 		/* Install our interrupt handlers for Error,
 		 * Transmit, and Receive
 		 */
-		err = request_irq(gfar_irq(grp, ER)->irq, gfar_error,
-				  IRQF_NO_SUSPEND,
+		err = request_irq(gfar_irq(grp, ER)->irq, gfar_error, 0,
 				  gfar_irq(grp, ER)->name, grp);
 		if (err < 0) {
 			netif_err(priv, intr, dev, "Can't get IRQ %d\n",
@@ -1979,6 +1978,8 @@ static int register_grp_irqs(struct gfar_priv_grp *grp)
 
 			goto err_irq_fail;
 		}
+		enable_irq_wake(gfar_irq(grp, ER)->irq);
+
 		err = request_irq(gfar_irq(grp, TX)->irq, gfar_transmit, 0,
 				  gfar_irq(grp, TX)->name, grp);
 		if (err < 0) {
@@ -1994,14 +1995,14 @@ static int register_grp_irqs(struct gfar_priv_grp *grp)
 			goto rx_irq_fail;
 		}
 	} else {
-		err = request_irq(gfar_irq(grp, TX)->irq, gfar_interrupt,
-				  IRQF_NO_SUSPEND,
+		err = request_irq(gfar_irq(grp, TX)->irq, gfar_interrupt, 0,
 				  gfar_irq(grp, TX)->name, grp);
 		if (err < 0) {
 			netif_err(priv, intr, dev, "Can't get IRQ %d\n",
 				  gfar_irq(grp, TX)->irq);
 			goto err_irq_fail;
 		}
+		enable_irq_wake(gfar_irq(grp, TX)->irq);
 	}
 
 	return 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
@ 2015-09-21 15:47   ` Sudeep Holla
  2015-09-21 15:46 ` [PATCH 03/17] input: tegra-kbc: drop use " Sudeep Holla
                     ` (14 subsequent siblings)
  16 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	Mauro Carvalho Chehab, linux-arm-kernel, kernel, linux-media

The device is set as wakeup capable using proper wakeup API but the
driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
which is incorrect.

This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
enable_irq_wake instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kernel@stlinux.com
Cc: linux-media@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/media/rc/st_rc.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index 37d040158dff..1fa0c9d1c508 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -16,6 +16,7 @@
 #include <linux/reset.h>
 #include <media/rc-core.h>
 #include <linux/pinctrl/consumer.h>
+#include <linux/pm_wakeirq.h>
 
 struct st_rc_device {
 	struct device			*dev;
@@ -190,6 +191,9 @@ static void st_rc_hardware_init(struct st_rc_device *dev)
 static int st_rc_remove(struct platform_device *pdev)
 {
 	struct st_rc_device *rc_dev = platform_get_drvdata(pdev);
+
+	dev_pm_clear_wake_irq(&pdev->dev);
+	device_init_wakeup(&pdev->dev, false);
 	clk_disable_unprepare(rc_dev->sys_clock);
 	rc_unregister_device(rc_dev->rdev);
 	return 0;
@@ -298,22 +302,22 @@ static int st_rc_probe(struct platform_device *pdev)
 	rdev->map_name = RC_MAP_LIRC;
 	rdev->input_name = "ST Remote Control Receiver";
 
-	/* enable wake via this device */
-	device_set_wakeup_capable(dev, true);
-	device_set_wakeup_enable(dev, true);
-
 	ret = rc_register_device(rdev);
 	if (ret < 0)
 		goto clkerr;
 
 	rc_dev->rdev = rdev;
 	if (devm_request_irq(dev, rc_dev->irq, st_rc_rx_interrupt,
-			IRQF_NO_SUSPEND, IR_ST_NAME, rc_dev) < 0) {
+			     0, IR_ST_NAME, rc_dev) < 0) {
 		dev_err(dev, "IRQ %d register failed\n", rc_dev->irq);
 		ret = -EINVAL;
 		goto rcerr;
 	}
 
+	/* enable wake via this device */
+	device_init_wakeup(dev, true);
+	dev_pm_set_wake_irq(dev, rc_dev->irq);
+
 	/**
 	 * for LIRC_MODE_MODE2 or LIRC_MODE_PULSE or LIRC_MODE_RAW
 	 * lircd expects a long space first before a signal train to sync.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-09-21 15:47   ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: kernel, Mauro Carvalho Chehab, Srinivas Kandagatla,
	Rafael J. Wysocki, Patrice Chotard, Sudeep Holla,
	Thomas Gleixner, linux-media, linux-arm-kernel, Maxime Coquelin

The device is set as wakeup capable using proper wakeup API but the
driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
which is incorrect.

This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
enable_irq_wake instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kernel@stlinux.com
Cc: linux-media@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/media/rc/st_rc.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index 37d040158dff..1fa0c9d1c508 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -16,6 +16,7 @@
 #include <linux/reset.h>
 #include <media/rc-core.h>
 #include <linux/pinctrl/consumer.h>
+#include <linux/pm_wakeirq.h>
 
 struct st_rc_device {
 	struct device			*dev;
@@ -190,6 +191,9 @@ static void st_rc_hardware_init(struct st_rc_device *dev)
 static int st_rc_remove(struct platform_device *pdev)
 {
 	struct st_rc_device *rc_dev = platform_get_drvdata(pdev);
+
+	dev_pm_clear_wake_irq(&pdev->dev);
+	device_init_wakeup(&pdev->dev, false);
 	clk_disable_unprepare(rc_dev->sys_clock);
 	rc_unregister_device(rc_dev->rdev);
 	return 0;
@@ -298,22 +302,22 @@ static int st_rc_probe(struct platform_device *pdev)
 	rdev->map_name = RC_MAP_LIRC;
 	rdev->input_name = "ST Remote Control Receiver";
 
-	/* enable wake via this device */
-	device_set_wakeup_capable(dev, true);
-	device_set_wakeup_enable(dev, true);
-
 	ret = rc_register_device(rdev);
 	if (ret < 0)
 		goto clkerr;
 
 	rc_dev->rdev = rdev;
 	if (devm_request_irq(dev, rc_dev->irq, st_rc_rx_interrupt,
-			IRQF_NO_SUSPEND, IR_ST_NAME, rc_dev) < 0) {
+			     0, IR_ST_NAME, rc_dev) < 0) {
 		dev_err(dev, "IRQ %d register failed\n", rc_dev->irq);
 		ret = -EINVAL;
 		goto rcerr;
 	}
 
+	/* enable wake via this device */
+	device_init_wakeup(dev, true);
+	dev_pm_set_wake_irq(dev, rc_dev->irq);
+
 	/**
 	 * for LIRC_MODE_MODE2 or LIRC_MODE_PULSE or LIRC_MODE_RAW
 	 * lircd expects a long space first before a signal train to sync.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-09-21 15:47   ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

The device is set as wakeup capable using proper wakeup API but the
driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
which is incorrect.

This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
enable_irq_wake instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: kernel at stlinux.com
Cc: linux-media at vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/media/rc/st_rc.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index 37d040158dff..1fa0c9d1c508 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -16,6 +16,7 @@
 #include <linux/reset.h>
 #include <media/rc-core.h>
 #include <linux/pinctrl/consumer.h>
+#include <linux/pm_wakeirq.h>
 
 struct st_rc_device {
 	struct device			*dev;
@@ -190,6 +191,9 @@ static void st_rc_hardware_init(struct st_rc_device *dev)
 static int st_rc_remove(struct platform_device *pdev)
 {
 	struct st_rc_device *rc_dev = platform_get_drvdata(pdev);
+
+	dev_pm_clear_wake_irq(&pdev->dev);
+	device_init_wakeup(&pdev->dev, false);
 	clk_disable_unprepare(rc_dev->sys_clock);
 	rc_unregister_device(rc_dev->rdev);
 	return 0;
@@ -298,22 +302,22 @@ static int st_rc_probe(struct platform_device *pdev)
 	rdev->map_name = RC_MAP_LIRC;
 	rdev->input_name = "ST Remote Control Receiver";
 
-	/* enable wake via this device */
-	device_set_wakeup_capable(dev, true);
-	device_set_wakeup_enable(dev, true);
-
 	ret = rc_register_device(rdev);
 	if (ret < 0)
 		goto clkerr;
 
 	rc_dev->rdev = rdev;
 	if (devm_request_irq(dev, rc_dev->irq, st_rc_rx_interrupt,
-			IRQF_NO_SUSPEND, IR_ST_NAME, rc_dev) < 0) {
+			     0, IR_ST_NAME, rc_dev) < 0) {
 		dev_err(dev, "IRQ %d register failed\n", rc_dev->irq);
 		ret = -EINVAL;
 		goto rcerr;
 	}
 
+	/* enable wake via this device */
+	device_init_wakeup(dev, true);
+	dev_pm_set_wake_irq(dev, rc_dev->irq);
+
 	/**
 	 * for LIRC_MODE_MODE2 or LIRC_MODE_PULSE or LIRC_MODE_RAW
 	 * lircd expects a long space first before a signal train to sync.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 15/17] ir-hix5hd2: drop the use of IRQF_NO_SUSPEND
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (13 preceding siblings ...)
  2015-09-21 15:47   ` Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-09-23 14:26   ` zhangfei
  2015-09-21 15:47 ` [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
  2015-09-21 15:47   ` Sudeep Holla
  16 siblings, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Mauro Carvalho Chehab, Zhangfei Gao, Patrice Chotard,
	Fabio Estevam, Guoxiong Yan, linux-media

This driver doesn't claim the IR transmitter to be wakeup source. It
even disables the clock and the IR during suspend-resume cycle.

This patch removes yet another misuse of IRQF_NO_SUSPEND.

Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Guoxiong Yan <yanguoxiong@huawei.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/media/rc/ir-hix5hd2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
index 1c087cb76815..d0549fba711c 100644
--- a/drivers/media/rc/ir-hix5hd2.c
+++ b/drivers/media/rc/ir-hix5hd2.c
@@ -257,7 +257,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
 		goto clkerr;
 
 	if (devm_request_irq(dev, priv->irq, hix5hd2_ir_rx_interrupt,
-			     IRQF_NO_SUSPEND, pdev->name, priv) < 0) {
+			     0, pdev->name, priv) < 0) {
 		dev_err(dev, "IRQ %d register failed\n", priv->irq);
 		ret = -EINVAL;
 		goto regerr;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
                   ` (14 preceding siblings ...)
  2015-09-21 15:47 ` [PATCH 15/17] ir-hix5hd2: drop the use of IRQF_NO_SUSPEND Sudeep Holla
@ 2015-09-21 15:47 ` Sudeep Holla
  2015-09-21 18:53   ` Thomas Gleixner
  2015-09-21 15:47   ` Sudeep Holla
  16 siblings, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Linus Walleij,
	linux-gpio

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 replacing it with
irq_set_irq_wake instead.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/pinctrl/pinctrl-single.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index ef04b962c3d5..a5d0f0e52de1 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1615,12 +1615,14 @@ static void pcs_irq_unmask(struct irq_data *d)
  */
 static int pcs_irq_set_wake(struct irq_data *d, unsigned int state)
 {
+	struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d);
+
 	if (state)
 		pcs_irq_unmask(d);
 	else
 		pcs_irq_mask(d);
 
-	return 0;
+	return irq_set_irq_wake(pcs_soc->irq, state);
 }
 
 /**
@@ -1755,8 +1757,7 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,
 		int res;
 
 		res = request_irq(pcs_soc->irq, pcs_irq_handler,
-				  IRQF_SHARED | IRQF_NO_SUSPEND |
-				  IRQF_NO_THREAD,
+				  IRQF_SHARED | IRQF_NO_THREAD,
 				  name, pcs_soc);
 		if (res) {
 			pcs_soc->irq = -1;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
  2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-09-21 15:47   ` Sudeep Holla
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
                     ` (15 subsequent siblings)
  16 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki, Linus Walleij,
	linux-arm-kernel

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 replacing it with
enable_irq_wake instead.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/mfd/ab8500-core.c        | 11 +++++++++--
 drivers/mfd/ab8500-debugfs.c     |  2 +-
 drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
 drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
 drivers/power/ab8500_btemp.c     |  6 ++++--
 drivers/power/ab8500_charger.c   |  6 ++++--
 drivers/power/ab8500_fg.c        |  9 ++++++---
 drivers/thermal/db8500_thermal.c |  5 ++---
 drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
 9 files changed, 60 insertions(+), 28 deletions(-)

Hi Linus,

This just compile tested and need proper testing as the changes are more
invasive compared to other patches in the series. Any review/testing
is much appreciated.

Regards,
Sudeep

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index fefbe4cfa61d..640c1854c953 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -435,6 +435,13 @@ static int ab8500_irq_set_type(struct irq_data *data, unsigned int type)
 	return 0;
 }
 
+static int ab8500_irq_set_wake(struct irq_data *data, unsigned int on)
+{
+	struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
+
+	return irq_set_irq_wake(ab8500->irq, on);
+}
+
 static struct irq_chip ab8500_irq_chip = {
 	.name			= "ab8500",
 	.irq_bus_lock		= ab8500_irq_lock,
@@ -443,6 +450,7 @@ static struct irq_chip ab8500_irq_chip = {
 	.irq_disable		= ab8500_irq_mask,
 	.irq_unmask		= ab8500_irq_unmask,
 	.irq_set_type		= ab8500_irq_set_type,
+	.irq_set_wake		= ab8500_irq_set_wake,
 };
 
 static void update_latch_offset(u8 *offset, int i)
@@ -1744,8 +1752,7 @@ static int ab8500_probe(struct platform_device *pdev)
 		return ret;
 
 	ret = devm_request_threaded_irq(&pdev->dev, ab8500->irq, NULL,
-			ab8500_hierarchical_irq,
-			IRQF_ONESHOT | IRQF_NO_SUSPEND,
+			ab8500_hierarchical_irq, IRQF_ONESHOT,
 			"ab8500", ab8500);
 	if (ret)
 		return ret;
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index 0236cd7cdce4..9a2c37041b9e 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -2885,7 +2885,7 @@ static ssize_t ab8500_subscribe_write(struct file *file,
 	}
 
 	err = request_threaded_irq(user_val, NULL, ab8500_debug_handler,
-				   IRQF_SHARED | IRQF_NO_SUSPEND | IRQF_ONESHOT,
+				   IRQF_SHARED | IRQF_ONESHOT,
 				   "ab8500-debug", &dev->kobj);
 	if (err < 0) {
 		pr_info("request_threaded_irq failed %d, %lu\n",
diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
index c51c1b188d64..69a8122a334f 100644
--- a/drivers/mfd/ab8500-gpadc.c
+++ b/drivers/mfd/ab8500-gpadc.c
@@ -948,7 +948,7 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
 	if (gpadc->irq_sw >= 0) {
 		ret = request_threaded_irq(gpadc->irq_sw, NULL,
 			ab8500_bm_gpadcconvend_handler,
-			IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
+			IRQF_SHARED | IRQF_ONESHOT,
 			"ab8500-gpadc-sw",
 			gpadc);
 		if (ret < 0) {
@@ -962,7 +962,7 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
 	if (gpadc->irq_hw >= 0) {
 		ret = request_threaded_irq(gpadc->irq_hw, NULL,
 			ab8500_bm_gpadcconvend_handler,
-			IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
+			IRQF_SHARED | IRQF_ONESHOT,
 			"ab8500-gpadc-hw",
 			gpadc);
 		if (ret < 0) {
@@ -994,6 +994,9 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
 	pm_runtime_set_active(gpadc->dev);
 	pm_runtime_enable(gpadc->dev);
 
+	enable_irq_wake(gpadc->irq_sw);
+	enable_irq_wake(gpadc->irq_hw);
+
 	ab8500_gpadc_read_calibration_data(gpadc);
 	list_add_tail(&gpadc->node, &ab8500_gpadc_list);
 	dev_dbg(gpadc->dev, "probe success\n");
@@ -1015,10 +1018,14 @@ static int ab8500_gpadc_remove(struct platform_device *pdev)
 	/* remove this gpadc entry from the list */
 	list_del(&gpadc->node);
 	/* remove interrupt  - completion of Sw ADC conversion */
-	if (gpadc->irq_sw >= 0)
+	if (gpadc->irq_sw >= 0) {
+		disable_irq_wake(gpadc->irq_sw);
 		free_irq(gpadc->irq_sw, gpadc);
-	if (gpadc->irq_hw >= 0)
+	}
+	if (gpadc->irq_hw >= 0) {
+		disable_irq_wake(gpadc->irq_hw);
 		free_irq(gpadc->irq_hw, gpadc);
+	}
 
 	pm_runtime_get_sync(gpadc->dev);
 	pm_runtime_disable(gpadc->dev);
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index e6e4bacb09ee..d568ecd66f7e 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -266,6 +266,7 @@ static struct {
 } fw_info;
 
 static struct irq_domain *db8500_irq_domain;
+static int prcmu_irq;
 
 /*
  * This vector maps irq numbers to the bits in the bit field used in
@@ -2599,12 +2600,20 @@ static void noop(struct irq_data *d)
 {
 }
 
+static int prcmu_irq_set_wake(struct irq_data *data, unsigned int on)
+{
+	int *irq = irq_data_get_irq_chip_data(data);
+
+	return irq_set_irq_wake(*irq, on);
+}
+
 static struct irq_chip prcmu_irq_chip = {
 	.name		= "prcmu",
 	.irq_disable	= prcmu_irq_mask,
 	.irq_ack	= noop,
 	.irq_mask	= prcmu_irq_mask,
 	.irq_unmask	= prcmu_irq_unmask,
+	.irq_set_wake	= prcmu_irq_set_wake,
 };
 
 static __init char *fw_project_name(u32 project)
@@ -2652,6 +2661,7 @@ static __init char *fw_project_name(u32 project)
 static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
 				irq_hw_number_t hwirq)
 {
+	irq_set_chip_data(virq, d->host_data);
 	irq_set_chip_and_handler(virq, &prcmu_irq_chip,
 				handle_simple_irq);
 
@@ -2669,7 +2679,7 @@ static int db8500_irq_init(struct device_node *np)
 
 	db8500_irq_domain = irq_domain_add_simple(
 		np, NUM_PRCMU_WAKEUPS, 0,
-		&db8500_irq_ops, NULL);
+		&db8500_irq_ops, &prcmu_irq);
 
 	if (!db8500_irq_domain) {
 		pr_err("Failed to create irqdomain\n");
@@ -3134,7 +3144,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev);
-	int irq = 0, err = 0;
+	int err = 0;
 	struct resource *res;
 
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu");
@@ -3166,14 +3176,14 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
 	/* Clean up the mailbox interrupts after pre-kernel code. */
 	writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);
 
-	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
+	prcmu_irq = platform_get_irq(pdev, 0);
+	if (prcmu_irq <= 0) {
 		dev_err(&pdev->dev, "no prcmu irq provided\n");
-		return irq;
+		return prcmu_irq;
 	}
 
-	err = request_threaded_irq(irq, prcmu_irq_handler,
-	        prcmu_irq_thread_fn, IRQF_NO_SUSPEND, "prcmu", NULL);
+	err = request_threaded_irq(prcmu_irq, prcmu_irq_handler,
+				   prcmu_irq_thread_fn, 0, "prcmu", NULL);
 	if (err < 0) {
 		pr_err("prcmu: Failed to allocate IRQ_DB8500_PRCMU1.\n");
 		return err;
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c
index 8f8044e1acf3..ab838b35c7be 100644
--- a/drivers/power/ab8500_btemp.c
+++ b/drivers/power/ab8500_btemp.c
@@ -1032,6 +1032,7 @@ static int ab8500_btemp_remove(struct platform_device *pdev)
 	/* Disable interrupts */
 	for (i = 0; i < ARRAY_SIZE(ab8500_btemp_irq); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_btemp_irq[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 
@@ -1149,14 +1150,14 @@ static int ab8500_btemp_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(ab8500_btemp_irq); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_btemp_irq[i].name);
 		ret = request_threaded_irq(irq, NULL, ab8500_btemp_irq[i].isr,
-			IRQF_SHARED | IRQF_NO_SUSPEND,
-			ab8500_btemp_irq[i].name, di);
+			IRQF_SHARED, ab8500_btemp_irq[i].name, di);
 
 		if (ret) {
 			dev_err(di->dev, "failed to request %s IRQ %d: %d\n"
 				, ab8500_btemp_irq[i].name, irq, ret);
 			goto free_irq;
 		}
+		enable_irq_wake(irq);
 		dev_dbg(di->dev, "Requested %s IRQ %d: %d\n",
 			ab8500_btemp_irq[i].name, irq, ret);
 	}
@@ -1175,6 +1176,7 @@ static int ab8500_btemp_probe(struct platform_device *pdev)
 	/* We also have to free all successfully registered irqs */
 	for (i = i - 1; i >= 0; i--) {
 		irq = platform_get_irq_byname(pdev, ab8500_btemp_irq[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 free_btemp_wq:
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index e388171f4e58..734fe43181ab 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -3406,6 +3406,7 @@ static int ab8500_charger_remove(struct platform_device *pdev)
 	/* Disable interrupts */
 	for (i = 0; i < ARRAY_SIZE(ab8500_charger_irq); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 
@@ -3680,14 +3681,14 @@ static int ab8500_charger_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(ab8500_charger_irq); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
 		ret = request_threaded_irq(irq, NULL, ab8500_charger_irq[i].isr,
-			IRQF_SHARED | IRQF_NO_SUSPEND,
-			ab8500_charger_irq[i].name, di);
+			IRQF_SHARED, ab8500_charger_irq[i].name, di);
 
 		if (ret != 0) {
 			dev_err(di->dev, "failed to request %s IRQ %d: %d\n"
 				, ab8500_charger_irq[i].name, irq, ret);
 			goto free_irq;
 		}
+		enable_irq_wake(irq);
 		dev_dbg(di->dev, "Requested %s IRQ %d: %d\n",
 			ab8500_charger_irq[i].name, irq, ret);
 	}
@@ -3721,6 +3722,7 @@ static int ab8500_charger_probe(struct platform_device *pdev)
 	/* We also have to free all successfully registered irqs */
 	for (i = i - 1; i >= 0; i--) {
 		irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 put_usb_phy:
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index 3830dade5d69..8f0193e7c42c 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -3168,14 +3168,14 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(ab8500_fg_irq_th); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_fg_irq_th[i].name);
 		ret = request_irq(irq, ab8500_fg_irq_th[i].isr,
-				  IRQF_SHARED | IRQF_NO_SUSPEND,
-				  ab8500_fg_irq_th[i].name, di);
+				  IRQF_SHARED, ab8500_fg_irq_th[i].name, di);
 
 		if (ret != 0) {
 			dev_err(di->dev, "failed to request %s IRQ %d: %d\n",
 				ab8500_fg_irq_th[i].name, irq, ret);
 			goto free_irq;
 		}
+		enable_irq_wake(irq);
 		dev_dbg(di->dev, "Requested %s IRQ %d: %d\n",
 			ab8500_fg_irq_th[i].name, irq, ret);
 	}
@@ -3183,7 +3183,7 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 	/* Register threaded interrupt handler */
 	irq = platform_get_irq_byname(pdev, ab8500_fg_irq_bh[0].name);
 	ret = request_threaded_irq(irq, NULL, ab8500_fg_irq_bh[0].isr,
-				IRQF_SHARED | IRQF_NO_SUSPEND | IRQF_ONESHOT,
+				IRQF_SHARED | IRQF_ONESHOT,
 			ab8500_fg_irq_bh[0].name, di);
 
 	if (ret != 0) {
@@ -3191,6 +3191,7 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 			ab8500_fg_irq_bh[0].name, irq, ret);
 		goto free_irq;
 	}
+	enable_irq_wake(irq);
 	dev_dbg(di->dev, "Requested %s IRQ %d: %d\n",
 		ab8500_fg_irq_bh[0].name, irq, ret);
 
@@ -3233,9 +3234,11 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 	/* We also have to free all registered irqs */
 	for (i = 0; i < ARRAY_SIZE(ab8500_fg_irq_th); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_fg_irq_th[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 	irq = platform_get_irq_byname(pdev, ab8500_fg_irq_bh[0].name);
+	disable_irq_wake(irq);
 	free_irq(irq, di);
 free_inst_curr_wq:
 	destroy_workqueue(di->fg_wq);
diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c
index 652acd8fbe48..27b534374d29 100644
--- a/drivers/thermal/db8500_thermal.c
+++ b/drivers/thermal/db8500_thermal.c
@@ -423,8 +423,7 @@ static int db8500_thermal_probe(struct platform_device *pdev)
 	}
 
 	ret = devm_request_threaded_irq(&pdev->dev, low_irq, NULL,
-		prcmu_low_irq_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
-		"dbx500_temp_low", pzone);
+		prcmu_low_irq_handler, IRQF_ONESHOT, "dbx500_temp_low", pzone);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Failed to allocate temp low irq.\n");
 		goto out_unlock;
@@ -438,7 +437,7 @@ static int db8500_thermal_probe(struct platform_device *pdev)
 	}
 
 	ret = devm_request_threaded_irq(&pdev->dev, high_irq, NULL,
-		prcmu_high_irq_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
+		prcmu_high_irq_handler, IRQF_ONESHOT,
 		"dbx500_temp_high", pzone);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Failed to allocate temp high irq.\n");
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index 0c912d3950a5..425bb4e171e7 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -1179,12 +1179,13 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 		}
 		err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 				ab8500_usb_link_status_irq,
-				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
+				IRQF_SHARED | IRQF_ONESHOT,
 				"usb-link-status", ab);
 		if (err < 0) {
 			dev_err(ab->dev, "request_irq failed for link status irq\n");
 			return err;
 		}
+		enable_irq_wake(irq);
 	}
 
 	if (ab->flags & AB8500_USB_FLAG_USE_ID_WAKEUP_IRQ) {
@@ -1195,12 +1196,12 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 		}
 		err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 				ab8500_usb_disconnect_irq,
-				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
-				"usb-id-fall", ab);
+				IRQF_SHARED | IRQF_ONESHOT, "usb-id-fall", ab);
 		if (err < 0) {
 			dev_err(ab->dev, "request_irq failed for ID fall irq\n");
 			return err;
 		}
+		enable_irq_wake(irq);
 	}
 
 	if (ab->flags & AB8500_USB_FLAG_USE_VBUS_DET_IRQ) {
@@ -1211,12 +1212,13 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 		}
 		err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 				ab8500_usb_disconnect_irq,
-				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
+				IRQF_SHARED | IRQF_ONESHOT,
 				"usb-vbus-fall", ab);
 		if (err < 0) {
 			dev_err(ab->dev, "request_irq failed for Vbus fall irq\n");
 			return err;
 		}
+		enable_irq_wake(irq);
 	}
 
 	return 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
@ 2015-09-21 15:47   ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

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 replacing it with
enable_irq_wake instead.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/mfd/ab8500-core.c        | 11 +++++++++--
 drivers/mfd/ab8500-debugfs.c     |  2 +-
 drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
 drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
 drivers/power/ab8500_btemp.c     |  6 ++++--
 drivers/power/ab8500_charger.c   |  6 ++++--
 drivers/power/ab8500_fg.c        |  9 ++++++---
 drivers/thermal/db8500_thermal.c |  5 ++---
 drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
 9 files changed, 60 insertions(+), 28 deletions(-)

Hi Linus,

This just compile tested and need proper testing as the changes are more
invasive compared to other patches in the series. Any review/testing
is much appreciated.

Regards,
Sudeep

diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index fefbe4cfa61d..640c1854c953 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -435,6 +435,13 @@ static int ab8500_irq_set_type(struct irq_data *data, unsigned int type)
 	return 0;
 }
 
+static int ab8500_irq_set_wake(struct irq_data *data, unsigned int on)
+{
+	struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
+
+	return irq_set_irq_wake(ab8500->irq, on);
+}
+
 static struct irq_chip ab8500_irq_chip = {
 	.name			= "ab8500",
 	.irq_bus_lock		= ab8500_irq_lock,
@@ -443,6 +450,7 @@ static struct irq_chip ab8500_irq_chip = {
 	.irq_disable		= ab8500_irq_mask,
 	.irq_unmask		= ab8500_irq_unmask,
 	.irq_set_type		= ab8500_irq_set_type,
+	.irq_set_wake		= ab8500_irq_set_wake,
 };
 
 static void update_latch_offset(u8 *offset, int i)
@@ -1744,8 +1752,7 @@ static int ab8500_probe(struct platform_device *pdev)
 		return ret;
 
 	ret = devm_request_threaded_irq(&pdev->dev, ab8500->irq, NULL,
-			ab8500_hierarchical_irq,
-			IRQF_ONESHOT | IRQF_NO_SUSPEND,
+			ab8500_hierarchical_irq, IRQF_ONESHOT,
 			"ab8500", ab8500);
 	if (ret)
 		return ret;
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index 0236cd7cdce4..9a2c37041b9e 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -2885,7 +2885,7 @@ static ssize_t ab8500_subscribe_write(struct file *file,
 	}
 
 	err = request_threaded_irq(user_val, NULL, ab8500_debug_handler,
-				   IRQF_SHARED | IRQF_NO_SUSPEND | IRQF_ONESHOT,
+				   IRQF_SHARED | IRQF_ONESHOT,
 				   "ab8500-debug", &dev->kobj);
 	if (err < 0) {
 		pr_info("request_threaded_irq failed %d, %lu\n",
diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
index c51c1b188d64..69a8122a334f 100644
--- a/drivers/mfd/ab8500-gpadc.c
+++ b/drivers/mfd/ab8500-gpadc.c
@@ -948,7 +948,7 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
 	if (gpadc->irq_sw >= 0) {
 		ret = request_threaded_irq(gpadc->irq_sw, NULL,
 			ab8500_bm_gpadcconvend_handler,
-			IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
+			IRQF_SHARED | IRQF_ONESHOT,
 			"ab8500-gpadc-sw",
 			gpadc);
 		if (ret < 0) {
@@ -962,7 +962,7 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
 	if (gpadc->irq_hw >= 0) {
 		ret = request_threaded_irq(gpadc->irq_hw, NULL,
 			ab8500_bm_gpadcconvend_handler,
-			IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
+			IRQF_SHARED | IRQF_ONESHOT,
 			"ab8500-gpadc-hw",
 			gpadc);
 		if (ret < 0) {
@@ -994,6 +994,9 @@ static int ab8500_gpadc_probe(struct platform_device *pdev)
 	pm_runtime_set_active(gpadc->dev);
 	pm_runtime_enable(gpadc->dev);
 
+	enable_irq_wake(gpadc->irq_sw);
+	enable_irq_wake(gpadc->irq_hw);
+
 	ab8500_gpadc_read_calibration_data(gpadc);
 	list_add_tail(&gpadc->node, &ab8500_gpadc_list);
 	dev_dbg(gpadc->dev, "probe success\n");
@@ -1015,10 +1018,14 @@ static int ab8500_gpadc_remove(struct platform_device *pdev)
 	/* remove this gpadc entry from the list */
 	list_del(&gpadc->node);
 	/* remove interrupt  - completion of Sw ADC conversion */
-	if (gpadc->irq_sw >= 0)
+	if (gpadc->irq_sw >= 0) {
+		disable_irq_wake(gpadc->irq_sw);
 		free_irq(gpadc->irq_sw, gpadc);
-	if (gpadc->irq_hw >= 0)
+	}
+	if (gpadc->irq_hw >= 0) {
+		disable_irq_wake(gpadc->irq_hw);
 		free_irq(gpadc->irq_hw, gpadc);
+	}
 
 	pm_runtime_get_sync(gpadc->dev);
 	pm_runtime_disable(gpadc->dev);
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index e6e4bacb09ee..d568ecd66f7e 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -266,6 +266,7 @@ static struct {
 } fw_info;
 
 static struct irq_domain *db8500_irq_domain;
+static int prcmu_irq;
 
 /*
  * This vector maps irq numbers to the bits in the bit field used in
@@ -2599,12 +2600,20 @@ static void noop(struct irq_data *d)
 {
 }
 
+static int prcmu_irq_set_wake(struct irq_data *data, unsigned int on)
+{
+	int *irq = irq_data_get_irq_chip_data(data);
+
+	return irq_set_irq_wake(*irq, on);
+}
+
 static struct irq_chip prcmu_irq_chip = {
 	.name		= "prcmu",
 	.irq_disable	= prcmu_irq_mask,
 	.irq_ack	= noop,
 	.irq_mask	= prcmu_irq_mask,
 	.irq_unmask	= prcmu_irq_unmask,
+	.irq_set_wake	= prcmu_irq_set_wake,
 };
 
 static __init char *fw_project_name(u32 project)
@@ -2652,6 +2661,7 @@ static __init char *fw_project_name(u32 project)
 static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
 				irq_hw_number_t hwirq)
 {
+	irq_set_chip_data(virq, d->host_data);
 	irq_set_chip_and_handler(virq, &prcmu_irq_chip,
 				handle_simple_irq);
 
@@ -2669,7 +2679,7 @@ static int db8500_irq_init(struct device_node *np)
 
 	db8500_irq_domain = irq_domain_add_simple(
 		np, NUM_PRCMU_WAKEUPS, 0,
-		&db8500_irq_ops, NULL);
+		&db8500_irq_ops, &prcmu_irq);
 
 	if (!db8500_irq_domain) {
 		pr_err("Failed to create irqdomain\n");
@@ -3134,7 +3144,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev);
-	int irq = 0, err = 0;
+	int err = 0;
 	struct resource *res;
 
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu");
@@ -3166,14 +3176,14 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
 	/* Clean up the mailbox interrupts after pre-kernel code. */
 	writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);
 
-	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
+	prcmu_irq = platform_get_irq(pdev, 0);
+	if (prcmu_irq <= 0) {
 		dev_err(&pdev->dev, "no prcmu irq provided\n");
-		return irq;
+		return prcmu_irq;
 	}
 
-	err = request_threaded_irq(irq, prcmu_irq_handler,
-	        prcmu_irq_thread_fn, IRQF_NO_SUSPEND, "prcmu", NULL);
+	err = request_threaded_irq(prcmu_irq, prcmu_irq_handler,
+				   prcmu_irq_thread_fn, 0, "prcmu", NULL);
 	if (err < 0) {
 		pr_err("prcmu: Failed to allocate IRQ_DB8500_PRCMU1.\n");
 		return err;
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c
index 8f8044e1acf3..ab838b35c7be 100644
--- a/drivers/power/ab8500_btemp.c
+++ b/drivers/power/ab8500_btemp.c
@@ -1032,6 +1032,7 @@ static int ab8500_btemp_remove(struct platform_device *pdev)
 	/* Disable interrupts */
 	for (i = 0; i < ARRAY_SIZE(ab8500_btemp_irq); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_btemp_irq[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 
@@ -1149,14 +1150,14 @@ static int ab8500_btemp_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(ab8500_btemp_irq); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_btemp_irq[i].name);
 		ret = request_threaded_irq(irq, NULL, ab8500_btemp_irq[i].isr,
-			IRQF_SHARED | IRQF_NO_SUSPEND,
-			ab8500_btemp_irq[i].name, di);
+			IRQF_SHARED, ab8500_btemp_irq[i].name, di);
 
 		if (ret) {
 			dev_err(di->dev, "failed to request %s IRQ %d: %d\n"
 				, ab8500_btemp_irq[i].name, irq, ret);
 			goto free_irq;
 		}
+		enable_irq_wake(irq);
 		dev_dbg(di->dev, "Requested %s IRQ %d: %d\n",
 			ab8500_btemp_irq[i].name, irq, ret);
 	}
@@ -1175,6 +1176,7 @@ static int ab8500_btemp_probe(struct platform_device *pdev)
 	/* We also have to free all successfully registered irqs */
 	for (i = i - 1; i >= 0; i--) {
 		irq = platform_get_irq_byname(pdev, ab8500_btemp_irq[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 free_btemp_wq:
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index e388171f4e58..734fe43181ab 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -3406,6 +3406,7 @@ static int ab8500_charger_remove(struct platform_device *pdev)
 	/* Disable interrupts */
 	for (i = 0; i < ARRAY_SIZE(ab8500_charger_irq); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 
@@ -3680,14 +3681,14 @@ static int ab8500_charger_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(ab8500_charger_irq); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
 		ret = request_threaded_irq(irq, NULL, ab8500_charger_irq[i].isr,
-			IRQF_SHARED | IRQF_NO_SUSPEND,
-			ab8500_charger_irq[i].name, di);
+			IRQF_SHARED, ab8500_charger_irq[i].name, di);
 
 		if (ret != 0) {
 			dev_err(di->dev, "failed to request %s IRQ %d: %d\n"
 				, ab8500_charger_irq[i].name, irq, ret);
 			goto free_irq;
 		}
+		enable_irq_wake(irq);
 		dev_dbg(di->dev, "Requested %s IRQ %d: %d\n",
 			ab8500_charger_irq[i].name, irq, ret);
 	}
@@ -3721,6 +3722,7 @@ static int ab8500_charger_probe(struct platform_device *pdev)
 	/* We also have to free all successfully registered irqs */
 	for (i = i - 1; i >= 0; i--) {
 		irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 put_usb_phy:
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index 3830dade5d69..8f0193e7c42c 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -3168,14 +3168,14 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(ab8500_fg_irq_th); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_fg_irq_th[i].name);
 		ret = request_irq(irq, ab8500_fg_irq_th[i].isr,
-				  IRQF_SHARED | IRQF_NO_SUSPEND,
-				  ab8500_fg_irq_th[i].name, di);
+				  IRQF_SHARED, ab8500_fg_irq_th[i].name, di);
 
 		if (ret != 0) {
 			dev_err(di->dev, "failed to request %s IRQ %d: %d\n",
 				ab8500_fg_irq_th[i].name, irq, ret);
 			goto free_irq;
 		}
+		enable_irq_wake(irq);
 		dev_dbg(di->dev, "Requested %s IRQ %d: %d\n",
 			ab8500_fg_irq_th[i].name, irq, ret);
 	}
@@ -3183,7 +3183,7 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 	/* Register threaded interrupt handler */
 	irq = platform_get_irq_byname(pdev, ab8500_fg_irq_bh[0].name);
 	ret = request_threaded_irq(irq, NULL, ab8500_fg_irq_bh[0].isr,
-				IRQF_SHARED | IRQF_NO_SUSPEND | IRQF_ONESHOT,
+				IRQF_SHARED | IRQF_ONESHOT,
 			ab8500_fg_irq_bh[0].name, di);
 
 	if (ret != 0) {
@@ -3191,6 +3191,7 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 			ab8500_fg_irq_bh[0].name, irq, ret);
 		goto free_irq;
 	}
+	enable_irq_wake(irq);
 	dev_dbg(di->dev, "Requested %s IRQ %d: %d\n",
 		ab8500_fg_irq_bh[0].name, irq, ret);
 
@@ -3233,9 +3234,11 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 	/* We also have to free all registered irqs */
 	for (i = 0; i < ARRAY_SIZE(ab8500_fg_irq_th); i++) {
 		irq = platform_get_irq_byname(pdev, ab8500_fg_irq_th[i].name);
+		disable_irq_wake(irq);
 		free_irq(irq, di);
 	}
 	irq = platform_get_irq_byname(pdev, ab8500_fg_irq_bh[0].name);
+	disable_irq_wake(irq);
 	free_irq(irq, di);
 free_inst_curr_wq:
 	destroy_workqueue(di->fg_wq);
diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c
index 652acd8fbe48..27b534374d29 100644
--- a/drivers/thermal/db8500_thermal.c
+++ b/drivers/thermal/db8500_thermal.c
@@ -423,8 +423,7 @@ static int db8500_thermal_probe(struct platform_device *pdev)
 	}
 
 	ret = devm_request_threaded_irq(&pdev->dev, low_irq, NULL,
-		prcmu_low_irq_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
-		"dbx500_temp_low", pzone);
+		prcmu_low_irq_handler, IRQF_ONESHOT, "dbx500_temp_low", pzone);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Failed to allocate temp low irq.\n");
 		goto out_unlock;
@@ -438,7 +437,7 @@ static int db8500_thermal_probe(struct platform_device *pdev)
 	}
 
 	ret = devm_request_threaded_irq(&pdev->dev, high_irq, NULL,
-		prcmu_high_irq_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
+		prcmu_high_irq_handler, IRQF_ONESHOT,
 		"dbx500_temp_high", pzone);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Failed to allocate temp high irq.\n");
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index 0c912d3950a5..425bb4e171e7 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -1179,12 +1179,13 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 		}
 		err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 				ab8500_usb_link_status_irq,
-				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
+				IRQF_SHARED | IRQF_ONESHOT,
 				"usb-link-status", ab);
 		if (err < 0) {
 			dev_err(ab->dev, "request_irq failed for link status irq\n");
 			return err;
 		}
+		enable_irq_wake(irq);
 	}
 
 	if (ab->flags & AB8500_USB_FLAG_USE_ID_WAKEUP_IRQ) {
@@ -1195,12 +1196,12 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 		}
 		err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 				ab8500_usb_disconnect_irq,
-				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
-				"usb-id-fall", ab);
+				IRQF_SHARED | IRQF_ONESHOT, "usb-id-fall", ab);
 		if (err < 0) {
 			dev_err(ab->dev, "request_irq failed for ID fall irq\n");
 			return err;
 		}
+		enable_irq_wake(irq);
 	}
 
 	if (ab->flags & AB8500_USB_FLAG_USE_VBUS_DET_IRQ) {
@@ -1211,12 +1212,13 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 		}
 		err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 				ab8500_usb_disconnect_irq,
-				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
+				IRQF_SHARED | IRQF_ONESHOT,
 				"usb-vbus-fall", ab);
 		if (err < 0) {
 			dev_err(ab->dev, "request_irq failed for Vbus fall irq\n");
 			return err;
 		}
+		enable_irq_wake(irq);
 	}
 
 	return 0;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 110+ messages in thread

* RE: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:47 ` [PATCH 13/17] net: gianfar: " Sudeep Holla
@ 2015-09-21 16:24   ` Manoil Claudiu
  2015-09-21 16:38     ` Sudeep Holla
  2015-09-21 16:51     ` Thomas Gleixner
  2015-09-24 21:23   ` David Miller
  1 sibling, 2 replies; 110+ messages in thread
From: Manoil Claudiu @ 2015-09-21 16:24 UTC (permalink / raw)
  To: Sudeep Holla, linux-pm, linux-kernel
  Cc: Thomas Gleixner, Rafael J. Wysocki, David S. Miller, Kevin Hao, netdev

>-----Original Message-----
>From: Sudeep Holla [mailto:sudeep.holla@arm.com]
>Sent: Monday, September 21, 2015 6:47 PM
>To: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org
>Cc: Sudeep Holla <sudeep.holla@arm.com>; Thomas Gleixner
><tglx@linutronix.de>; Rafael J. Wysocki <rjw@rjwysocki.net>; David S. Miller
><davem@davemloft.net>; Manoil Claudiu-B08782
><claudiu.manoil@freescale.com>; Kevin Hao <haokexin@gmail.com>;
>netdev@vger.kernel.org
>Subject: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND
>flag
>
>The device is set as wakeup capable using proper wakeup API but the
>driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
>which is incorrect.
>
>This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
>enable_irq_wake instead.
>

What would be the purpose of IRQF_NO_SUSPEND flag then?  The flag is a
friendlier API compared to calling enable_irq_wake().  For older kernels,
on PPC architectures, the flag did the job.  When did this change? Since
when using IRQF_NO_SUSPEND is a "misuse"?

Thanks,
Claudiu

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 16:24   ` Manoil Claudiu
@ 2015-09-21 16:38     ` Sudeep Holla
  2015-09-21 16:51     ` Thomas Gleixner
  1 sibling, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-21 16:38 UTC (permalink / raw)
  To: Manoil Claudiu, linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	David S. Miller, Kevin Hao, netdev



On 21/09/15 17:24, Manoil Claudiu wrote:
>> -----Original Message-----
>> From: Sudeep Holla [mailto:sudeep.holla@arm.com]
>> Sent: Monday, September 21, 2015 6:47 PM
>> To: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org
>> Cc: Sudeep Holla <sudeep.holla@arm.com>; Thomas Gleixner
>> <tglx@linutronix.de>; Rafael J. Wysocki <rjw@rjwysocki.net>; David S. Miller
>> <davem@davemloft.net>; Manoil Claudiu-B08782
>> <claudiu.manoil@freescale.com>; Kevin Hao <haokexin@gmail.com>;
>> netdev@vger.kernel.org
>> Subject: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND
>> flag
>>
>> The device is set as wakeup capable using proper wakeup API but the
>> driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
>> which is incorrect.
>>
>> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
>> enable_irq_wake instead.
>>
>
> What would be the purpose of IRQF_NO_SUSPEND flag then?

If you look at the section "IRQF_NO_SUSPEND Flag" in
Documentation/power/suspend-and-interrupts.txt, it states it doesn't
guarantee that the interrupt will wake the system from a suspended state
-- for such cases it is necessary to use enable_irq_wake().

> The flag is a friendlier API compared to calling enable_irq_wake().

In what sense ?

> For older kernels, on PPC architectures, the flag did the job.

Agreed, it does the job even now, just that it's not designed for that.
One can change that anytime internally as the APIs for configuring
wakeups as in place now. I am just making use of right APIs.

> When did this change? Since when using IRQF_NO_SUSPEND is a "misuse"?
>

Sorry if the term "misuse" is not appropriate here, since the intention
of the flag usage doesn't meet the requirements, I mentioned it as misuse.

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 16:24   ` Manoil Claudiu
  2015-09-21 16:38     ` Sudeep Holla
@ 2015-09-21 16:51     ` Thomas Gleixner
  2015-09-22 14:04       ` Manoil Claudiu
  2015-09-23 21:20       ` Li Yang
  1 sibling, 2 replies; 110+ messages in thread
From: Thomas Gleixner @ 2015-09-21 16:51 UTC (permalink / raw)
  To: Manoil Claudiu
  Cc: Sudeep Holla, linux-pm, linux-kernel, Rafael J. Wysocki,
	David S. Miller, Kevin Hao, netdev

On Mon, 21 Sep 2015, Manoil Claudiu wrote:
> >The device is set as wakeup capable using proper wakeup API but the
> >driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
> >which is incorrect.
> >
> >This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
> >enable_irq_wake instead.
> >
> 
> What would be the purpose of IRQF_NO_SUSPEND flag then?  The flag is a
> friendlier API compared to calling enable_irq_wake().  For older kernels,

It's not an API, it's just a bandaid for lazy programmers.

> on PPC architectures, the flag did the job.  When did this change? Since
> when using IRQF_NO_SUSPEND is a "misuse"?

It always was. Simply because IRQF_NO_SUSPEND has absolutely nothing
to do with wakeup interrupt sources. It's a flag which excludes the
interrupt from the suspend mechanism, but it does not flag it a wakeup
source.

Thanks,

	tglx



^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:47 ` [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-09-21 18:53   ` Thomas Gleixner
  2015-09-22  9:42     ` Sudeep Holla
  0 siblings, 1 reply; 110+ messages in thread
From: Thomas Gleixner @ 2015-09-21 18:53 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Rafael J. Wysocki, Linus Walleij, linux-gpio

On Mon, 21 Sep 2015, Sudeep Holla wrote:
> 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 replacing it with
> irq_set_irq_wake instead.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/pinctrl/pinctrl-single.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> index ef04b962c3d5..a5d0f0e52de1 100644
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -1615,12 +1615,14 @@ static void pcs_irq_unmask(struct irq_data *d)
>   */
>  static int pcs_irq_set_wake(struct irq_data *d, unsigned int state)
>  {
> +	struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d);
> +
>  	if (state)
>  		pcs_irq_unmask(d);
>  	else
>  		pcs_irq_mask(d);
>  
> -	return 0;
> +	return irq_set_irq_wake(pcs_soc->irq, state);

That's going to create at least a lockdep splat due to nesting
irq_desc->lock.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
  2015-09-21 15:47   ` Sudeep Holla
@ 2015-09-21 23:20     ` Lee Jones
  -1 siblings, 0 replies; 110+ messages in thread
From: Lee Jones @ 2015-09-21 23:20 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Linus Walleij, linux-arm-kernel

On Mon, 21 Sep 2015, Sudeep Holla wrote:

> 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 replacing it with
> enable_irq_wake instead.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/mfd/ab8500-core.c        | 11 +++++++++--
>  drivers/mfd/ab8500-debugfs.c     |  2 +-
>  drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
>  drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
>  drivers/power/ab8500_btemp.c     |  6 ++++--
>  drivers/power/ab8500_charger.c   |  6 ++++--
>  drivers/power/ab8500_fg.c        |  9 ++++++---
>  drivers/thermal/db8500_thermal.c |  5 ++---
>  drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
>  9 files changed, 60 insertions(+), 28 deletions(-)

Is there a reason for bundling the changes in all of these subsystems
together into a single patch?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
@ 2015-09-21 23:20     ` Lee Jones
  0 siblings, 0 replies; 110+ messages in thread
From: Lee Jones @ 2015-09-21 23:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 21 Sep 2015, Sudeep Holla wrote:

> 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 replacing it with
> enable_irq_wake instead.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-arm-kernel at lists.infradead.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/mfd/ab8500-core.c        | 11 +++++++++--
>  drivers/mfd/ab8500-debugfs.c     |  2 +-
>  drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
>  drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
>  drivers/power/ab8500_btemp.c     |  6 ++++--
>  drivers/power/ab8500_charger.c   |  6 ++++--
>  drivers/power/ab8500_fg.c        |  9 ++++++---
>  drivers/thermal/db8500_thermal.c |  5 ++---
>  drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
>  9 files changed, 60 insertions(+), 28 deletions(-)

Is there a reason for bundling the changes in all of these subsystems
together into a single patch?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 07/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-21 15:47 ` [PATCH 07/17] input: tegra-kbc: drop use " Sudeep Holla
@ 2015-09-21 23:21   ` Lee Jones
  2015-09-22  0:43     ` Dmitry Torokhov
  2015-09-22 10:00     ` Sudeep Holla
  2015-09-25 12:39   ` [PATCH 07/17][UPDATE] mfd: qcom_rpm: Drop " Sudeep Holla
  1 sibling, 2 replies; 110+ messages in thread
From: Lee Jones @ 2015-09-21 23:21 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki, Samuel Ortiz

The $SUBJECT is not correct.

> The driver handles wakeup irq correctly using irq_set_irq_wake. There's
> no need to use IRQF_NO_SUSPEND while registering the interrupt.
> 
> This patch removes the use of IRQF_NO_SUSPEND flag.
> 
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/mfd/qcom_rpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

... code is fine though:

Acked-by: Lee Jones <lee.jones@linaro.org>

Please re-submit with the subject line fixed.

> diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c
> index 6afc9fabd94c..207a3bd68559 100644
> --- a/drivers/mfd/qcom_rpm.c
> +++ b/drivers/mfd/qcom_rpm.c
> @@ -550,7 +550,7 @@ static int qcom_rpm_probe(struct platform_device *pdev)
>  	ret = devm_request_irq(&pdev->dev,
>  			       irq_ack,
>  			       qcom_rpm_ack_interrupt,
> -			       IRQF_TRIGGER_RISING | IRQF_NO_SUSPEND,
> +			       IRQF_TRIGGER_RISING,
>  			       "qcom_rpm_ack",
>  			       rpm);
>  	if (ret) {

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 07/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-21 23:21   ` Lee Jones
@ 2015-09-22  0:43     ` Dmitry Torokhov
  2015-09-22 21:08       ` Lee Jones
  2015-09-22 10:00     ` Sudeep Holla
  1 sibling, 1 reply; 110+ messages in thread
From: Dmitry Torokhov @ 2015-09-22  0:43 UTC (permalink / raw)
  To: Lee Jones
  Cc: Sudeep Holla, linux-pm, lkml, Thomas Gleixner, Rafael J. Wysocki,
	Samuel Ortiz

On Mon, Sep 21, 2015 at 4:21 PM, Lee Jones <lee.jones@linaro.org> wrote:
> The $SUBJECT is not correct.
>
>> The driver handles wakeup irq correctly using irq_set_irq_wake. There's
>> no need to use IRQF_NO_SUSPEND while registering the interrupt.
>>
>> This patch removes the use of IRQF_NO_SUSPEND flag.
>>
>> Cc: Samuel Ortiz <sameo@linux.intel.com>
>> Cc: Lee Jones <lee.jones@linaro.org>
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>>  drivers/mfd/qcom_rpm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> ... code is fine though:
>
> Acked-by: Lee Jones <lee.jones@linaro.org>
>
> Please re-submit with the subject line fixed.

What's wrong with the subject?

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 18:53   ` Thomas Gleixner
@ 2015-09-22  9:42     ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-22  9:42 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Sudeep Holla, linux-pm, linux-kernel, Rafael J. Wysocki,
	Linus Walleij, linux-gpio



On 21/09/15 19:53, Thomas Gleixner wrote:
> On Mon, 21 Sep 2015, Sudeep Holla wrote:
>> 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 replacing it with
>> irq_set_irq_wake instead.
>>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-gpio@vger.kernel.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>>   drivers/pinctrl/pinctrl-single.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
>> index ef04b962c3d5..a5d0f0e52de1 100644
>> --- a/drivers/pinctrl/pinctrl-single.c
>> +++ b/drivers/pinctrl/pinctrl-single.c
>> @@ -1615,12 +1615,14 @@ static void pcs_irq_unmask(struct irq_data *d)
>>    */
>>   static int pcs_irq_set_wake(struct irq_data *d, unsigned int state)
>>   {
>> +	struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d);
>> +
>>   	if (state)
>>   		pcs_irq_unmask(d);
>>   	else
>>   		pcs_irq_mask(d);
>>
>> -	return 0;
>> +	return irq_set_irq_wake(pcs_soc->irq, state);
>
> That's going to create at least a lockdep splat due to nesting
> irq_desc->lock.
>

Ah right, I noted that I must fix it when you pointed out similar issue
on the other thread[1]. I forgot later, sorry will look into that.

Regards,
Sudeep

[1] https://lkml.org/lkml/2015/9/8/617

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 07/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-21 23:21   ` Lee Jones
  2015-09-22  0:43     ` Dmitry Torokhov
@ 2015-09-22 10:00     ` Sudeep Holla
  1 sibling, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-22 10:00 UTC (permalink / raw)
  To: Lee Jones
  Cc: Sudeep Holla, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Samuel Ortiz

Hi Lee,

On 22/09/15 00:21, Lee Jones wrote:
> The $SUBJECT is not correct.
>

Any suggestions ? Most of this series I have used "remove misuse..."
But this driver was doing things correctly, just that it left this
flag as is.

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
  2015-09-21 23:20     ` Lee Jones
  (?)
@ 2015-09-22 10:04       ` Sudeep Holla
  -1 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-22 10:04 UTC (permalink / raw)
  To: Lee Jones
  Cc: Sudeep Holla, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Linus Walleij, linux-arm-kernel



On 22/09/15 00:20, Lee Jones wrote:
> On Mon, 21 Sep 2015, Sudeep Holla wrote:
>
>> 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 replacing it with
>> enable_irq_wake instead.
>>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>>   drivers/mfd/ab8500-core.c        | 11 +++++++++--
>>   drivers/mfd/ab8500-debugfs.c     |  2 +-
>>   drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
>>   drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
>>   drivers/power/ab8500_btemp.c     |  6 ++++--
>>   drivers/power/ab8500_charger.c   |  6 ++++--
>>   drivers/power/ab8500_fg.c        |  9 ++++++---
>>   drivers/thermal/db8500_thermal.c |  5 ++---
>>   drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
>>   9 files changed, 60 insertions(+), 28 deletions(-)
>
> Is there a reason for bundling the changes in all of these subsystems
> together into a single patch?
>

No, I understand this needs to be split. Since I was not 100% confident
about this change, I wanted LinusW to review and provide feedback and
gets things working before I can split this changes. I must have added
RFC, but usually it gets ignored :)

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
@ 2015-09-22 10:04       ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-22 10:04 UTC (permalink / raw)
  To: Lee Jones
  Cc: Sudeep Holla, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Linus Walleij, linux-arm-kernel



On 22/09/15 00:20, Lee Jones wrote:
> On Mon, 21 Sep 2015, Sudeep Holla wrote:
>
>> 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 replacing it with
>> enable_irq_wake instead.
>>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>>   drivers/mfd/ab8500-core.c        | 11 +++++++++--
>>   drivers/mfd/ab8500-debugfs.c     |  2 +-
>>   drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
>>   drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
>>   drivers/power/ab8500_btemp.c     |  6 ++++--
>>   drivers/power/ab8500_charger.c   |  6 ++++--
>>   drivers/power/ab8500_fg.c        |  9 ++++++---
>>   drivers/thermal/db8500_thermal.c |  5 ++---
>>   drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
>>   9 files changed, 60 insertions(+), 28 deletions(-)
>
> Is there a reason for bundling the changes in all of these subsystems
> together into a single patch?
>

No, I understand this needs to be split. Since I was not 100% confident
about this change, I wanted LinusW to review and provide feedback and
gets things working before I can split this changes. I must have added
RFC, but usually it gets ignored :)

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
@ 2015-09-22 10:04       ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-22 10:04 UTC (permalink / raw)
  To: linux-arm-kernel



On 22/09/15 00:20, Lee Jones wrote:
> On Mon, 21 Sep 2015, Sudeep Holla wrote:
>
>> 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 replacing it with
>> enable_irq_wake instead.
>>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-arm-kernel at lists.infradead.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>>   drivers/mfd/ab8500-core.c        | 11 +++++++++--
>>   drivers/mfd/ab8500-debugfs.c     |  2 +-
>>   drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
>>   drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
>>   drivers/power/ab8500_btemp.c     |  6 ++++--
>>   drivers/power/ab8500_charger.c   |  6 ++++--
>>   drivers/power/ab8500_fg.c        |  9 ++++++---
>>   drivers/thermal/db8500_thermal.c |  5 ++---
>>   drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
>>   9 files changed, 60 insertions(+), 28 deletions(-)
>
> Is there a reason for bundling the changes in all of these subsystems
> together into a single patch?
>

No, I understand this needs to be split. Since I was not 100% confident
about this change, I wanted LinusW to review and provide feedback and
gets things working before I can split this changes. I must have added
RFC, but usually it gets ignored :)

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 16:51     ` Thomas Gleixner
@ 2015-09-22 14:04       ` Manoil Claudiu
  2015-09-22 15:09         ` Sudeep Holla
  2015-09-23 21:20       ` Li Yang
  1 sibling, 1 reply; 110+ messages in thread
From: Manoil Claudiu @ 2015-09-22 14:04 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Sudeep Holla, linux-pm, linux-kernel, Rafael J. Wysocki,
	David S. Miller, Kevin Hao, netdev

>-----Original Message-----
>From: Thomas Gleixner [mailto:tglx@linutronix.de]
>Sent: Monday, September 21, 2015 7:52 PM
>To: Manoil Claudiu-B08782 <claudiu.manoil@freescale.com>
>Cc: Sudeep Holla <sudeep.holla@arm.com>; linux-pm@vger.kernel.org; linux-
>kernel@vger.kernel.org; Rafael J. Wysocki <rjw@rjwysocki.net>; David S.
>Miller <davem@davemloft.net>; Kevin Hao <haokexin@gmail.com>;
>netdev@vger.kernel.org
>Subject: RE: [PATCH 13/17] net: gianfar: remove misuse of
>IRQF_NO_SUSPEND flag
>
>On Mon, 21 Sep 2015, Manoil Claudiu wrote:
>> >The device is set as wakeup capable using proper wakeup API but the
>> >driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
>> >which is incorrect.
>> >
>> >This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
>> >enable_irq_wake instead.
>> >
>>
>> What would be the purpose of IRQF_NO_SUSPEND flag then?  The flag is a
>> friendlier API compared to calling enable_irq_wake().  For older kernels,
>
>It's not an API, it's just a bandaid for lazy programmers.
>
>> on PPC architectures, the flag did the job.  When did this change? Since
>> when using IRQF_NO_SUSPEND is a "misuse"?
>
>It always was. Simply because IRQF_NO_SUSPEND has absolutely nothing
>to do with wakeup interrupt sources. It's a flag which excludes the
>interrupt from the suspend mechanism, but it does not flag it a wakeup
>source.
>

I'm seeing also a "powerpc: mpic" patch in the series, unfortunately I can't
afford to test it right now. However I ran a quick test with this gianfar patch
in isolation on a powerpc system, and seen some difference in the behavior
(with and w/o the patch).  In both cases the system wakes up from standby
by magic packet.  However, without the IRQF_NO_SUSPEND flag 2 wake-up
interrupts are reported in /proc/interrupts for one magic packet; with the
flag on there's just 1 interrupt.  Maybe this is not relevant, maybe the
"powerpc: mpic" patch from this series changes this behavior.
But if this is the API, what can I say? We'll see in time.  Btw, enable_irq_wake()
returns an error code, normally it should be handled by printing a warning
message at least, right?  But since most drivers don't handle that, I'm assuming
it should be left unhandled to avoid overcomplicating things.
FWIW
Acked-by: Claudiu Manoil <claudiu.manoil@freescale.com>


^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-22 14:04       ` Manoil Claudiu
@ 2015-09-22 15:09         ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-22 15:09 UTC (permalink / raw)
  To: Manoil Claudiu, Thomas Gleixner
  Cc: Sudeep Holla, linux-pm, linux-kernel, Rafael J. Wysocki,
	David S. Miller, Kevin Hao, netdev



On 22/09/15 15:04, Manoil Claudiu wrote:
>> -----Original Message-----
>> From: Thomas Gleixner [mailto:tglx@linutronix.de]

[...]

>>> on PPC architectures, the flag did the job.  When did this change? Since
>>> when using IRQF_NO_SUSPEND is a "misuse"?
>>
>> It always was. Simply because IRQF_NO_SUSPEND has absolutely nothing
>> to do with wakeup interrupt sources. It's a flag which excludes the
>> interrupt from the suspend mechanism, but it does not flag it a wakeup
>> source.
>>
>
> I'm seeing also a "powerpc: mpic" patch in the series, unfortunately I can't

Yes I think that was a redundant code, so I removed it. IIRC it was
setting IRQF_NO_SUSPEND in irq_set_wake callback which again is incorrect.

> afford to test it right now. However I ran a quick test with this gianfar patch
> in isolation on a powerpc system, and seen some difference in the behavior
> (with and w/o the patch).  In both cases the system wakes up from standby
> by magic packet.  However, without the IRQF_NO_SUSPEND flag 2 wake-up
> interrupts are reported in /proc/interrupts for one magic packet; with the

OK that's interesting, will have check if I have similar behavior on my
setup too.

> flag on there's just 1 interrupt.  Maybe this is not relevant, maybe the
> "powerpc: mpic" patch from this series changes this behavior.

Hmm not sure, but better to test it together if possible. If required we
can reorder for bisect-ability reasons.

> But if this is the API, what can I say? We'll see in time.  Btw, enable_irq_wake()
> returns an error code, normally it should be handled by printing a warning
> message at least, right?  But since most drivers don't handle that, I'm assuming
> it should be left unhandled to avoid overcomplicating things.

Yes I left it so that I can add if the maintainer insist and not churn
too much code adding warning.

> FWIW
> Acked-by: Claudiu Manoil <claudiu.manoil@freescale.com>
>

Thanks.

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
  2015-09-22 10:04       ` Sudeep Holla
  (?)
@ 2015-09-22 21:03         ` Lee Jones
  -1 siblings, 0 replies; 110+ messages in thread
From: Lee Jones @ 2015-09-22 21:03 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Linus Walleij, linux-arm-kernel

On Tue, 22 Sep 2015, Sudeep Holla wrote:
> On 22/09/15 00:20, Lee Jones wrote:
> >On Mon, 21 Sep 2015, Sudeep Holla wrote:
> >
> >>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 replacing it with
> >>enable_irq_wake instead.
> >>
> >>Cc: Linus Walleij <linus.walleij@linaro.org>
> >>Cc: linux-arm-kernel@lists.infradead.org
> >>Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> >>---
> >>  drivers/mfd/ab8500-core.c        | 11 +++++++++--
> >>  drivers/mfd/ab8500-debugfs.c     |  2 +-
> >>  drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
> >>  drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
> >>  drivers/power/ab8500_btemp.c     |  6 ++++--
> >>  drivers/power/ab8500_charger.c   |  6 ++++--
> >>  drivers/power/ab8500_fg.c        |  9 ++++++---
> >>  drivers/thermal/db8500_thermal.c |  5 ++---
> >>  drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
> >>  9 files changed, 60 insertions(+), 28 deletions(-)
> >
> >Is there a reason for bundling the changes in all of these subsystems
> >together into a single patch?
> >
> 
> No, I understand this needs to be split. Since I was not 100% confident
> about this change, I wanted LinusW to review and provide feedback and
> gets things working before I can split this changes. I must have added
> RFC, but usually it gets ignored :)

Best if Linus reviews the correct patch-set.  Please split and
resubmit.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
@ 2015-09-22 21:03         ` Lee Jones
  0 siblings, 0 replies; 110+ messages in thread
From: Lee Jones @ 2015-09-22 21:03 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Linus Walleij, linux-arm-kernel

On Tue, 22 Sep 2015, Sudeep Holla wrote:
> On 22/09/15 00:20, Lee Jones wrote:
> >On Mon, 21 Sep 2015, Sudeep Holla wrote:
> >
> >>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 replacing it with
> >>enable_irq_wake instead.
> >>
> >>Cc: Linus Walleij <linus.walleij@linaro.org>
> >>Cc: linux-arm-kernel@lists.infradead.org
> >>Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> >>---
> >>  drivers/mfd/ab8500-core.c        | 11 +++++++++--
> >>  drivers/mfd/ab8500-debugfs.c     |  2 +-
> >>  drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
> >>  drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
> >>  drivers/power/ab8500_btemp.c     |  6 ++++--
> >>  drivers/power/ab8500_charger.c   |  6 ++++--
> >>  drivers/power/ab8500_fg.c        |  9 ++++++---
> >>  drivers/thermal/db8500_thermal.c |  5 ++---
> >>  drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
> >>  9 files changed, 60 insertions(+), 28 deletions(-)
> >
> >Is there a reason for bundling the changes in all of these subsystems
> >together into a single patch?
> >
> 
> No, I understand this needs to be split. Since I was not 100% confident
> about this change, I wanted LinusW to review and provide feedback and
> gets things working before I can split this changes. I must have added
> RFC, but usually it gets ignored :)

Best if Linus reviews the correct patch-set.  Please split and
resubmit.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
@ 2015-09-22 21:03         ` Lee Jones
  0 siblings, 0 replies; 110+ messages in thread
From: Lee Jones @ 2015-09-22 21:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 22 Sep 2015, Sudeep Holla wrote:
> On 22/09/15 00:20, Lee Jones wrote:
> >On Mon, 21 Sep 2015, Sudeep Holla wrote:
> >
> >>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 replacing it with
> >>enable_irq_wake instead.
> >>
> >>Cc: Linus Walleij <linus.walleij@linaro.org>
> >>Cc: linux-arm-kernel at lists.infradead.org
> >>Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> >>---
> >>  drivers/mfd/ab8500-core.c        | 11 +++++++++--
> >>  drivers/mfd/ab8500-debugfs.c     |  2 +-
> >>  drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
> >>  drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
> >>  drivers/power/ab8500_btemp.c     |  6 ++++--
> >>  drivers/power/ab8500_charger.c   |  6 ++++--
> >>  drivers/power/ab8500_fg.c        |  9 ++++++---
> >>  drivers/thermal/db8500_thermal.c |  5 ++---
> >>  drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
> >>  9 files changed, 60 insertions(+), 28 deletions(-)
> >
> >Is there a reason for bundling the changes in all of these subsystems
> >together into a single patch?
> >
> 
> No, I understand this needs to be split. Since I was not 100% confident
> about this change, I wanted LinusW to review and provide feedback and
> gets things working before I can split this changes. I must have added
> RFC, but usually it gets ignored :)

Best if Linus reviews the correct patch-set.  Please split and
resubmit.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 07/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-22  0:43     ` Dmitry Torokhov
@ 2015-09-22 21:08       ` Lee Jones
  2015-09-23  8:53         ` Sudeep Holla
  0 siblings, 1 reply; 110+ messages in thread
From: Lee Jones @ 2015-09-22 21:08 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Sudeep Holla, linux-pm, lkml, Thomas Gleixner, Rafael J. Wysocki,
	Samuel Ortiz

On Mon, 21 Sep 2015, Dmitry Torokhov wrote:

> On Mon, Sep 21, 2015 at 4:21 PM, Lee Jones <lee.jones@linaro.org> wrote:
> > The $SUBJECT is not correct.
> >
> >> The driver handles wakeup irq correctly using irq_set_irq_wake. There's
> >> no need to use IRQF_NO_SUSPEND while registering the interrupt.
> >>
> >> This patch removes the use of IRQF_NO_SUSPEND flag.
> >>
> >> Cc: Samuel Ortiz <sameo@linux.intel.com>
> >> Cc: Lee Jones <lee.jones@linaro.org>
> >> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> >> ---
> >>  drivers/mfd/qcom_rpm.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > ... code is fine though:
> >
> > Acked-by: Lee Jones <lee.jones@linaro.org>
> >
> > Please re-submit with the subject line fixed.
> 
> What's wrong with the subject?

This patch has nothing to do with Input and the first word of the
explanatory sentence should start with an uppercase character.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-09-21 15:47 ` [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake Sudeep Holla
@ 2015-09-22 23:50     ` Scott Wood
  2015-09-23  4:06     ` Scott Wood
  1 sibling, 0 replies; 110+ messages in thread
From: Scott Wood @ 2015-09-22 23:50 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hongtao Jia, Marc Zyngier, linuxppc-dev, Wang Dongsheng

On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> as it doesn't guarantee wakeup for that interrupt.
> 
> This patch removes the redundant mpic_irq_set_wake and sets the
> IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Hongtao Jia <hongtao.jia@freescale.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  arch/powerpc/sysdev/mpic.c | 23 ++++-------------------
>  1 file changed, 4 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 537e5db85a06..123e43612f0a 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -924,22 +924,6 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int 
> flow_type)
>       return IRQ_SET_MASK_OK_NOCOPY;
>  }
>  
> -static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
> -{
> -     struct irq_desc *desc = container_of(d, struct irq_desc, irq_data);
> -     struct mpic *mpic = mpic_from_irq_data(d);
> -
> -     if (!(mpic->flags & MPIC_FSL))
> -             return -ENXIO;
> -
> -     if (on)
> -             desc->action->flags |= IRQF_NO_SUSPEND;
> -     else
> -             desc->action->flags &= ~IRQF_NO_SUSPEND;
> -
> -     return 0;
> -}
> -
>  void mpic_set_vector(unsigned int virq, unsigned int vector)
>  {
>       struct mpic *mpic = mpic_from_irq(virq);
> @@ -977,7 +961,6 @@ static struct irq_chip mpic_irq_chip = {
>       .irq_unmask     = mpic_unmask_irq,
>       .irq_eoi        = mpic_end_irq,
>       .irq_set_type   = mpic_set_irq_type,
> -     .irq_set_wake   = mpic_irq_set_wake,
>  };
>  
>  #ifdef CONFIG_SMP
> @@ -992,7 +975,6 @@ static struct irq_chip mpic_tm_chip = {
>       .irq_mask       = mpic_mask_tm,
>       .irq_unmask     = mpic_unmask_tm,
>       .irq_eoi        = mpic_end_irq,
> -     .irq_set_wake   = mpic_irq_set_wake,
>  };
>  
>  #ifdef CONFIG_MPIC_U3_HT_IRQS
> @@ -1283,8 +1265,11 @@ struct mpic * __init mpic_alloc(struct device_node 
> *node,
>               flags |= MPIC_NO_RESET;
>       if (of_get_property(node, "single-cpu-affinity", NULL))
>               flags |= MPIC_SINGLE_DEST_CPU;
> -     if (of_device_is_compatible(node, "fsl,mpic"))
> +     if (of_device_is_compatible(node, "fsl,mpic")) {
>               flags |= MPIC_FSL | MPIC_LARGE_VECTORS;
> +             mpic_irq_chip.flags |= IRQCHIP_SKIP_SET_WAKE;
> +             mpic_tm_chip.flags |= IRQCHIP_SKIP_SET_WAKE;
> +     }

What difference does IRQCHIP_SKIP_SET_WAKE make in the absence of an 
.irq_set_wake() callback?

This is basically repealing commit 5ff04b7287d87c1db7 ("powerpc/mpic: add 
irq_set_wake support").  Wang Dongsheng, can you explain why that patch was 
needed?

-Scott


^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
@ 2015-09-22 23:50     ` Scott Wood
  0 siblings, 0 replies; 110+ messages in thread
From: Scott Wood @ 2015-09-22 23:50 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hongtao Jia, Marc Zyngier, linuxppc-dev, Wang Dongsheng

On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> as it doesn't guarantee wakeup for that interrupt.
> 
> This patch removes the redundant mpic_irq_set_wake and sets the
> IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Hongtao Jia <hongtao.jia@freescale.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  arch/powerpc/sysdev/mpic.c | 23 ++++-------------------
>  1 file changed, 4 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 537e5db85a06..123e43612f0a 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -924,22 +924,6 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int 
> flow_type)
>       return IRQ_SET_MASK_OK_NOCOPY;
>  }
>  
> -static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
> -{
> -     struct irq_desc *desc = container_of(d, struct irq_desc, irq_data);
> -     struct mpic *mpic = mpic_from_irq_data(d);
> -
> -     if (!(mpic->flags & MPIC_FSL))
> -             return -ENXIO;
> -
> -     if (on)
> -             desc->action->flags |= IRQF_NO_SUSPEND;
> -     else
> -             desc->action->flags &= ~IRQF_NO_SUSPEND;
> -
> -     return 0;
> -}
> -
>  void mpic_set_vector(unsigned int virq, unsigned int vector)
>  {
>       struct mpic *mpic = mpic_from_irq(virq);
> @@ -977,7 +961,6 @@ static struct irq_chip mpic_irq_chip = {
>       .irq_unmask     = mpic_unmask_irq,
>       .irq_eoi        = mpic_end_irq,
>       .irq_set_type   = mpic_set_irq_type,
> -     .irq_set_wake   = mpic_irq_set_wake,
>  };
>  
>  #ifdef CONFIG_SMP
> @@ -992,7 +975,6 @@ static struct irq_chip mpic_tm_chip = {
>       .irq_mask       = mpic_mask_tm,
>       .irq_unmask     = mpic_unmask_tm,
>       .irq_eoi        = mpic_end_irq,
> -     .irq_set_wake   = mpic_irq_set_wake,
>  };
>  
>  #ifdef CONFIG_MPIC_U3_HT_IRQS
> @@ -1283,8 +1265,11 @@ struct mpic * __init mpic_alloc(struct device_node 
> *node,
>               flags |= MPIC_NO_RESET;
>       if (of_get_property(node, "single-cpu-affinity", NULL))
>               flags |= MPIC_SINGLE_DEST_CPU;
> -     if (of_device_is_compatible(node, "fsl,mpic"))
> +     if (of_device_is_compatible(node, "fsl,mpic")) {
>               flags |= MPIC_FSL | MPIC_LARGE_VECTORS;
> +             mpic_irq_chip.flags |= IRQCHIP_SKIP_SET_WAKE;
> +             mpic_tm_chip.flags |= IRQCHIP_SKIP_SET_WAKE;
> +     }

What difference does IRQCHIP_SKIP_SET_WAKE make in the absence of an 
.irq_set_wake() callback?

This is basically repealing commit 5ff04b7287d87c1db7 ("powerpc/mpic: add 
irq_set_wake support").  Wang Dongsheng, can you explain why that patch was 
needed?

-Scott

^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-09-22 23:50     ` Scott Wood
  (?)
@ 2015-09-23  2:35       ` Wang Dongsheng
  -1 siblings, 0 replies; 110+ messages in thread
From: Wang Dongsheng @ 2015-09-23  2:35 UTC (permalink / raw)
  To: Scott Wood, Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hongtao Jia, Marc Zyngier, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1579 bytes --]



> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Wednesday, September 23, 2015 7:50 AM
> To: Sudeep Holla
> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Thomas Gleixner;
> Rafael J. Wysocki; Benjamin Herrenschmidt; Paul Mackerras; Michael Ellerman; Jia
> Hongtao-B38951; Marc Zyngier; linuxppc-dev@lists.ozlabs.org; Wang Dongsheng-
> B40534
> Subject: Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of
> redundant mpic_irq_set_wake
> 
> On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > as it doesn't guarantee wakeup for that interrupt.
> >

Non-freescale return -ENXIO, is there any issue? If non-freescale platform does
not support it, but IPs still use enable/disable_irq_wake, we should return a error number.

IRQCHIP_SKIP_SET_WAKE just skip this feature, this is not our expected.
If non-freescale platform need this flag to skip this feature, it should be add
in self platform.

@Scott:
If set this flag we cannot keep a irq as a wakeup source when system going to
SUSPEND or MEM.

irq_set_wake() means we can set this irq as a wake source.
IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.

Regards,
-Dongsheng

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
@ 2015-09-23  2:35       ` Wang Dongsheng
  0 siblings, 0 replies; 110+ messages in thread
From: Wang Dongsheng @ 2015-09-23  2:35 UTC (permalink / raw)
  To: Scott Wood, Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hongtao Jia, Marc Zyngier, linuxppc-dev



> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Wednesday, September 23, 2015 7:50 AM
> To: Sudeep Holla
> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Thomas Gleixner;
> Rafael J. Wysocki; Benjamin Herrenschmidt; Paul Mackerras; Michael Ellerman; Jia
> Hongtao-B38951; Marc Zyngier; linuxppc-dev@lists.ozlabs.org; Wang Dongsheng-
> B40534
> Subject: Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of
> redundant mpic_irq_set_wake
> 
> On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > as it doesn't guarantee wakeup for that interrupt.
> >

Non-freescale return -ENXIO, is there any issue? If non-freescale platform does
not support it, but IPs still use enable/disable_irq_wake, we should return a error number.

IRQCHIP_SKIP_SET_WAKE just skip this feature, this is not our expected.
If non-freescale platform need this flag to skip this feature, it should be add
in self platform.

@Scott:
If set this flag we cannot keep a irq as a wakeup source when system going to
SUSPEND or MEM.

irq_set_wake() means we can set this irq as a wake source.
IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.

Regards,
-Dongsheng


^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
@ 2015-09-23  2:35       ` Wang Dongsheng
  0 siblings, 0 replies; 110+ messages in thread
From: Wang Dongsheng @ 2015-09-23  2:35 UTC (permalink / raw)
  To: Scott Wood, Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hongtao Jia, Marc Zyngier, linuxppc-dev

DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogV29vZCBTY290dC1CMDc0
MjENCj4gU2VudDogV2VkbmVzZGF5LCBTZXB0ZW1iZXIgMjMsIDIwMTUgNzo1MCBBTQ0KPiBUbzog
U3VkZWVwIEhvbGxhDQo+IENjOiBsaW51eC1wbUB2Z2VyLmtlcm5lbC5vcmc7IGxpbnV4LWtlcm5l
bEB2Z2VyLmtlcm5lbC5vcmc7IFRob21hcyBHbGVpeG5lcjsNCj4gUmFmYWVsIEouIFd5c29ja2k7
IEJlbmphbWluIEhlcnJlbnNjaG1pZHQ7IFBhdWwgTWFja2VycmFzOyBNaWNoYWVsIEVsbGVybWFu
OyBKaWENCj4gSG9uZ3Rhby1CMzg5NTE7IE1hcmMgWnluZ2llcjsgbGludXhwcGMtZGV2QGxpc3Rz
Lm96bGFicy5vcmc7IFdhbmcgRG9uZ3NoZW5nLQ0KPiBCNDA1MzQNCj4gU3ViamVjdDogUmU6IFtQ
QVRDSCAwNC8xN10gcG93ZXJwYzogbXBpYzogdXNlIElSUUNISVBfU0tJUF9TRVRfV0FLRSBpbnN0
ZWFkIG9mDQo+IHJlZHVuZGFudCBtcGljX2lycV9zZXRfd2FrZQ0KPiANCj4gT24gTW9uLCAyMDE1
LTA5LTIxIGF0IDE2OjQ3ICswMTAwLCBTdWRlZXAgSG9sbGEgd3JvdGU6DQo+ID4gbXBpY19pcnFf
c2V0X3dha2UgcmV0dXJuIC1FTlhJTyBmb3Igbm9uIEZTTCBNUElDIGFuZCBzZXRzIElSUUZfTk9f
U1VTUEVORA0KPiA+IGZsYWcgZm9yIEZTTCBvbmVzLiBlbmFibGVfaXJxX3dha2UgYWxyZWFkeSBy
ZXR1cm5zIC1FTlhJTyBpZiBpcnFfc2V0X3dhaw0KPiA+IGlzIG5vdCBpbXBsZW1lbnRlZC4gQWxz
byB0aGVyZSdzIG5vIG5lZWQgdG8gc2V0IHRoZSBJUlFGX05PX1NVU1BFTkQgZmxhZw0KPiA+IGFz
IGl0IGRvZXNuJ3QgZ3VhcmFudGVlIHdha2V1cCBmb3IgdGhhdCBpbnRlcnJ1cHQuDQo+ID4NCg0K
Tm9uLWZyZWVzY2FsZSByZXR1cm4gLUVOWElPLCBpcyB0aGVyZSBhbnkgaXNzdWU/IElmIG5vbi1m
cmVlc2NhbGUgcGxhdGZvcm0gZG9lcw0Kbm90IHN1cHBvcnQgaXQsIGJ1dCBJUHMgc3RpbGwgdXNl
IGVuYWJsZS9kaXNhYmxlX2lycV93YWtlLCB3ZSBzaG91bGQgcmV0dXJuIGEgZXJyb3IgbnVtYmVy
Lg0KDQpJUlFDSElQX1NLSVBfU0VUX1dBS0UganVzdCBza2lwIHRoaXMgZmVhdHVyZSwgdGhpcyBp
cyBub3Qgb3VyIGV4cGVjdGVkLg0KSWYgbm9uLWZyZWVzY2FsZSBwbGF0Zm9ybSBuZWVkIHRoaXMg
ZmxhZyB0byBza2lwIHRoaXMgZmVhdHVyZSwgaXQgc2hvdWxkIGJlIGFkZA0KaW4gc2VsZiBwbGF0
Zm9ybS4NCg0KQFNjb3R0Og0KSWYgc2V0IHRoaXMgZmxhZyB3ZSBjYW5ub3Qga2VlcCBhIGlycSBh
cyBhIHdha2V1cCBzb3VyY2Ugd2hlbiBzeXN0ZW0gZ29pbmcgdG8NClNVU1BFTkQgb3IgTUVNLg0K
DQppcnFfc2V0X3dha2UoKSBtZWFucyB3ZSBjYW4gc2V0IHRoaXMgaXJxIGFzIGEgd2FrZSBzb3Vy
Y2UuDQpJUlFDSElQX1NLSVBfU0VUX1dBS0UgaXMgaWdub3JlIGlycV9zZXRfd2FrZSgpIGZlYXR1
cmUuDQoNClJlZ2FyZHMsDQotRG9uZ3NoZW5nDQoNCg==

^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-09-23  2:35       ` Wang Dongsheng
  (?)
  (?)
@ 2015-09-23  3:49       ` Thomas Gleixner
  2015-09-23  5:31           ` Wang Dongsheng
  -1 siblings, 1 reply; 110+ messages in thread
From: Thomas Gleixner @ 2015-09-23  3:49 UTC (permalink / raw)
  To: Wang Dongsheng
  Cc: Scott Wood, Sudeep Holla, linux-pm, linux-kernel,
	Rafael J. Wysocki, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Hongtao Jia, Marc Zyngier, linuxppc-dev

On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > > as it doesn't guarantee wakeup for that interrupt.
> > >
> 
> Non-freescale return -ENXIO, is there any issue? If non-freescale
> platform does not support it, but IPs still use
> enable/disable_irq_wake, we should return a error number.

You can just set IRQCHIP_SKIP_SET_WAKE for FSL chips and not for the
others.

> @Scott:
> If set this flag we cannot keep a irq as a wakeup source when system going to
> SUSPEND or MEM.
> 
> irq_set_wake() means we can set this irq as a wake source.
> IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.

Nonsense. IRQCHIP_SKIP_SET_WAKE merily tells the core not to bail on
!chip->irq_set_wake(), but its still marking the interrupt as wakeup
source and therefor not masking it on suspend.

IRQF_NO_SUSPEND is the wrong tool. End of story.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-09-21 15:47 ` [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake Sudeep Holla
@ 2015-09-23  4:06     ` Scott Wood
  2015-09-23  4:06     ` Scott Wood
  1 sibling, 0 replies; 110+ messages in thread
From: Scott Wood @ 2015-09-23  4:06 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hongtao Jia, Marc Zyngier, linuxppc-dev, Wang Dongsheng-B40534

On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> as it doesn't guarantee wakeup for that interrupt.
> 
> This patch removes the redundant mpic_irq_set_wake and sets the
> IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Hongtao Jia <hongtao.jia@freescale.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  arch/powerpc/sysdev/mpic.c | 23 ++++-------------------
>  1 file changed, 4 insertions(+), 19 deletions(-)

Acked-by: Scott Wood <scottwood@freescale.com>

-Scott


^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
@ 2015-09-23  4:06     ` Scott Wood
  0 siblings, 0 replies; 110+ messages in thread
From: Scott Wood @ 2015-09-23  4:06 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hongtao Jia, Marc Zyngier, linuxppc-dev, Wang Dongsheng-B40534

On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> as it doesn't guarantee wakeup for that interrupt.
> 
> This patch removes the redundant mpic_irq_set_wake and sets the
> IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Hongtao Jia <hongtao.jia@freescale.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  arch/powerpc/sysdev/mpic.c | 23 ++++-------------------
>  1 file changed, 4 insertions(+), 19 deletions(-)

Acked-by: Scott Wood <scottwood@freescale.com>

-Scott

^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-09-23  3:49       ` Thomas Gleixner
@ 2015-09-23  5:31           ` Wang Dongsheng
  0 siblings, 0 replies; 110+ messages in thread
From: Wang Dongsheng @ 2015-09-23  5:31 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Scott Wood, Sudeep Holla, linux-pm, linux-kernel,
	Rafael J. Wysocki, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Hongtao Jia, Marc Zyngier, linuxppc-dev



> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> owner@vger.kernel.org] On Behalf Of Thomas Gleixner
> Sent: Wednesday, September 23, 2015 11:49 AM
> To: Wang Dongsheng-B40534
> Cc: Wood Scott-B07421; Sudeep Holla; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org; Rafael J. Wysocki; Benjamin Herrenschmidt; Paul
> Mackerras; Michael Ellerman; Jia Hongtao-B38951; Marc Zyngier; linuxppc-
> dev@lists.ozlabs.org
> Subject: RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of
> redundant mpic_irq_set_wake
> 
> On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> > > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > > > as it doesn't guarantee wakeup for that interrupt.
> > > >
> >
> > Non-freescale return -ENXIO, is there any issue? If non-freescale
> > platform does not support it, but IPs still use
> > enable/disable_irq_wake, we should return a error number.
> 
> You can just set IRQCHIP_SKIP_SET_WAKE for FSL chips and not for the
> others.
> 
> > @Scott:
> > If set this flag we cannot keep a irq as a wakeup source when system going to
> > SUSPEND or MEM.
> >
> > irq_set_wake() means we can set this irq as a wake source.
> > IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.
> 
> Nonsense. IRQCHIP_SKIP_SET_WAKE merily tells the core not to bail on
> !chip->irq_set_wake(), but its still marking the interrupt as wakeup
> source and therefor not masking it on suspend.
> 

Sorry, I just check irq_set_irq_wake() code, right, IRQCHIP_SKIP_SET_WAKE also can
going to irqd_set to mask IRQD_WAKEUP_STATE.

Yes, this flag just skip the irq_set_wake() not this feature.

Regards,
-Dongsheng


^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
@ 2015-09-23  5:31           ` Wang Dongsheng
  0 siblings, 0 replies; 110+ messages in thread
From: Wang Dongsheng @ 2015-09-23  5:31 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Scott Wood, Sudeep Holla, linux-pm, linux-kernel,
	Rafael J. Wysocki, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Hongtao Jia, Marc Zyngier, linuxppc-dev



> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> owner@vger.kernel.org] On Behalf Of Thomas Gleixner
> Sent: Wednesday, September 23, 2015 11:49 AM
> To: Wang Dongsheng-B40534
> Cc: Wood Scott-B07421; Sudeep Holla; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org; Rafael J. Wysocki; Benjamin Herrenschmidt; Paul
> Mackerras; Michael Ellerman; Jia Hongtao-B38951; Marc Zyngier; linuxppc-
> dev@lists.ozlabs.org
> Subject: RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE inste=
ad of
> redundant mpic_irq_set_wake
>=20
> On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_S=
USPEND
> > > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_se=
t_wak
> > > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND=
 flag
> > > > as it doesn't guarantee wakeup for that interrupt.
> > > >
> >
> > Non-freescale return -ENXIO, is there any issue? If non-freescale
> > platform does not support it, but IPs still use
> > enable/disable_irq_wake, we should return a error number.
>=20
> You can just set IRQCHIP_SKIP_SET_WAKE for FSL chips and not for the
> others.
>=20
> > @Scott:
> > If set this flag we cannot keep a irq as a wakeup source when system go=
ing to
> > SUSPEND or MEM.
> >
> > irq_set_wake() means we can set this irq as a wake source.
> > IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.
>=20
> Nonsense. IRQCHIP_SKIP_SET_WAKE merily tells the core not to bail on
> !chip->irq_set_wake(), but its still marking the interrupt as wakeup
> source and therefor not masking it on suspend.
>=20

Sorry, I just check irq_set_irq_wake() code, right, IRQCHIP_SKIP_SET_WAKE a=
lso can
going to irqd_set to mask IRQD_WAKEUP_STATE.

Yes, this flag just skip the irq_set_wake() not this feature.

Regards,
-Dongsheng

^ permalink raw reply	[flat|nested] 110+ messages in thread

* RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-09-23  5:31           ` Wang Dongsheng
  (?)
@ 2015-09-23  8:00           ` Thomas Gleixner
  -1 siblings, 0 replies; 110+ messages in thread
From: Thomas Gleixner @ 2015-09-23  8:00 UTC (permalink / raw)
  To: Wang Dongsheng
  Cc: Scott Wood, Sudeep Holla, linux-pm, linux-kernel,
	Rafael J. Wysocki, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Hongtao Jia, Marc Zyngier, linuxppc-dev

On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > -----Original Message-----
> > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> > owner@vger.kernel.org] On Behalf Of Thomas Gleixner
> > Sent: Wednesday, September 23, 2015 11:49 AM
> > To: Wang Dongsheng-B40534
> > Cc: Wood Scott-B07421; Sudeep Holla; linux-pm@vger.kernel.org; linux-
> > kernel@vger.kernel.org; Rafael J. Wysocki; Benjamin Herrenschmidt; Paul
> > Mackerras; Michael Ellerman; Jia Hongtao-B38951; Marc Zyngier; linuxppc-
> > dev@lists.ozlabs.org
> > Subject: RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of
> > redundant mpic_irq_set_wake

Can you please fix you mail client to get rid of that silly copy of
the mail header?

> > On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > > > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > > > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> > > > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > > > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > > > > as it doesn't guarantee wakeup for that interrupt.
> > > > >
> > >
> > > Non-freescale return -ENXIO, is there any issue? If non-freescale
> > > platform does not support it, but IPs still use
> > > enable/disable_irq_wake, we should return a error number.
> > 
> > You can just set IRQCHIP_SKIP_SET_WAKE for FSL chips and not for the
> > others.
> > 
> > > @Scott:
> > > If set this flag we cannot keep a irq as a wakeup source when system going to
> > > SUSPEND or MEM.
> > >
> > > irq_set_wake() means we can set this irq as a wake source.
> > > IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.
> > 
> > Nonsense. IRQCHIP_SKIP_SET_WAKE merily tells the core not to bail on
> > !chip->irq_set_wake(), but its still marking the interrupt as wakeup
> > source and therefor not masking it on suspend.
> > 
> 
> Sorry, I just check irq_set_irq_wake() code, right, IRQCHIP_SKIP_SET_WAKE also can
> going to irqd_set to mask IRQD_WAKEUP_STATE.
> 
> Yes, this flag just skip the irq_set_wake() not this feature.

And just for completeness. That commit 5ff04b7287d87c 'powerpc/mpic:
add irq_set_wake support' is another example of trainwreck engineering.

    desc->action->flags |= IRQF_NO_SUSPEND;

This is not only horribly avoiding any of the existing APIs, it's also
broken as hell. desc->action can be NULL when that is called.

It seems fleascale is hell bent to fiddle with the guts of the core
code mindlessly. See commit c866cda47f2c

Yours grumpy

      tglx



^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 07/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-22 21:08       ` Lee Jones
@ 2015-09-23  8:53         ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-23  8:53 UTC (permalink / raw)
  To: Lee Jones, Dmitry Torokhov
  Cc: Sudeep Holla, linux-pm, lkml, Thomas Gleixner, Rafael J. Wysocki,
	Samuel Ortiz



On 22/09/15 22:08, Lee Jones wrote:
> On Mon, 21 Sep 2015, Dmitry Torokhov wrote:
>
>> On Mon, Sep 21, 2015 at 4:21 PM, Lee Jones <lee.jones@linaro.org> wrote:
>>> The $SUBJECT is not correct.
>>>
>>>> The driver handles wakeup irq correctly using irq_set_irq_wake. There's
>>>> no need to use IRQF_NO_SUSPEND while registering the interrupt.
>>>>
>>>> This patch removes the use of IRQF_NO_SUSPEND flag.
>>>>
>>>> Cc: Samuel Ortiz <sameo@linux.intel.com>
>>>> Cc: Lee Jones <lee.jones@linaro.org>
>>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>>>> ---
>>>>   drivers/mfd/qcom_rpm.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> ... code is fine though:
>>>
>>> Acked-by: Lee Jones <lee.jones@linaro.org>
>>>
>>> Please re-submit with the subject line fixed.
>>
>> What's wrong with the subject?
>
> This patch has nothing to do with Input and the first word of the
> explanatory sentence should start with an uppercase character.
>

Ah my stupid mistake, I didn't realize it. Sorry for the noise, will
fix it and send.

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
  2015-09-22 21:03         ` Lee Jones
  (?)
@ 2015-09-23  9:44           ` Sudeep Holla
  -1 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-23  9:44 UTC (permalink / raw)
  To: Lee Jones
  Cc: Sudeep Holla, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Linus Walleij, linux-arm-kernel



On 22/09/15 22:03, Lee Jones wrote:
> On Tue, 22 Sep 2015, Sudeep Holla wrote:
>> On 22/09/15 00:20, Lee Jones wrote:
>>> On Mon, 21 Sep 2015, Sudeep Holla wrote:
>>>
>>>> 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 replacing it with
>>>> enable_irq_wake instead.
>>>>
>>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>>> Cc: linux-arm-kernel@lists.infradead.org
>>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>>>> ---
>>>>   drivers/mfd/ab8500-core.c        | 11 +++++++++--
>>>>   drivers/mfd/ab8500-debugfs.c     |  2 +-
>>>>   drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
>>>>   drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
>>>>   drivers/power/ab8500_btemp.c     |  6 ++++--
>>>>   drivers/power/ab8500_charger.c   |  6 ++++--
>>>>   drivers/power/ab8500_fg.c        |  9 ++++++---
>>>>   drivers/thermal/db8500_thermal.c |  5 ++---
>>>>   drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
>>>>   9 files changed, 60 insertions(+), 28 deletions(-)
>>>
>>> Is there a reason for bundling the changes in all of these subsystems
>>> together into a single patch?
>>>
>>
>> No, I understand this needs to be split. Since I was not 100% confident
>> about this change, I wanted LinusW to review and provide feedback and
>> gets things working before I can split this changes. I must have added
>> RFC, but usually it gets ignored :)
>
> Best if Linus reviews the correct patch-set.  Please split and
> resubmit.
>
Sure, but would like to get some feedback before I proceed just to
ensure my understanding is correct.

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
@ 2015-09-23  9:44           ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-23  9:44 UTC (permalink / raw)
  To: Lee Jones
  Cc: Sudeep Holla, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Linus Walleij, linux-arm-kernel



On 22/09/15 22:03, Lee Jones wrote:
> On Tue, 22 Sep 2015, Sudeep Holla wrote:
>> On 22/09/15 00:20, Lee Jones wrote:
>>> On Mon, 21 Sep 2015, Sudeep Holla wrote:
>>>
>>>> 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 replacing it with
>>>> enable_irq_wake instead.
>>>>
>>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>>> Cc: linux-arm-kernel@lists.infradead.org
>>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>>>> ---
>>>>   drivers/mfd/ab8500-core.c        | 11 +++++++++--
>>>>   drivers/mfd/ab8500-debugfs.c     |  2 +-
>>>>   drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
>>>>   drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
>>>>   drivers/power/ab8500_btemp.c     |  6 ++++--
>>>>   drivers/power/ab8500_charger.c   |  6 ++++--
>>>>   drivers/power/ab8500_fg.c        |  9 ++++++---
>>>>   drivers/thermal/db8500_thermal.c |  5 ++---
>>>>   drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
>>>>   9 files changed, 60 insertions(+), 28 deletions(-)
>>>
>>> Is there a reason for bundling the changes in all of these subsystems
>>> together into a single patch?
>>>
>>
>> No, I understand this needs to be split. Since I was not 100% confident
>> about this change, I wanted LinusW to review and provide feedback and
>> gets things working before I can split this changes. I must have added
>> RFC, but usually it gets ignored :)
>
> Best if Linus reviews the correct patch-set.  Please split and
> resubmit.
>
Sure, but would like to get some feedback before I proceed just to
ensure my understanding is correct.

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND
@ 2015-09-23  9:44           ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-09-23  9:44 UTC (permalink / raw)
  To: linux-arm-kernel



On 22/09/15 22:03, Lee Jones wrote:
> On Tue, 22 Sep 2015, Sudeep Holla wrote:
>> On 22/09/15 00:20, Lee Jones wrote:
>>> On Mon, 21 Sep 2015, Sudeep Holla wrote:
>>>
>>>> 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 replacing it with
>>>> enable_irq_wake instead.
>>>>
>>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>>> Cc: linux-arm-kernel at lists.infradead.org
>>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>>>> ---
>>>>   drivers/mfd/ab8500-core.c        | 11 +++++++++--
>>>>   drivers/mfd/ab8500-debugfs.c     |  2 +-
>>>>   drivers/mfd/ab8500-gpadc.c       | 15 +++++++++++----
>>>>   drivers/mfd/db8500-prcmu.c       | 24 +++++++++++++++++-------
>>>>   drivers/power/ab8500_btemp.c     |  6 ++++--
>>>>   drivers/power/ab8500_charger.c   |  6 ++++--
>>>>   drivers/power/ab8500_fg.c        |  9 ++++++---
>>>>   drivers/thermal/db8500_thermal.c |  5 ++---
>>>>   drivers/usb/phy/phy-ab8500-usb.c | 10 ++++++----
>>>>   9 files changed, 60 insertions(+), 28 deletions(-)
>>>
>>> Is there a reason for bundling the changes in all of these subsystems
>>> together into a single patch?
>>>
>>
>> No, I understand this needs to be split. Since I was not 100% confident
>> about this change, I wanted LinusW to review and provide feedback and
>> gets things working before I can split this changes. I must have added
>> RFC, but usually it gets ignored :)
>
> Best if Linus reviews the correct patch-set.  Please split and
> resubmit.
>
Sure, but would like to get some feedback before I proceed just to
ensure my understanding is correct.

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 15/17] ir-hix5hd2: drop the use of IRQF_NO_SUSPEND
  2015-09-21 15:47 ` [PATCH 15/17] ir-hix5hd2: drop the use of IRQF_NO_SUSPEND Sudeep Holla
@ 2015-09-23 14:26   ` zhangfei
  2015-09-23 14:37     ` Sudeep Holla
  0 siblings, 1 reply; 110+ messages in thread
From: zhangfei @ 2015-09-23 14:26 UTC (permalink / raw)
  To: Sudeep Holla, linux-pm, linux-kernel
  Cc: Thomas Gleixner, Rafael J. Wysocki, Mauro Carvalho Chehab,
	Patrice Chotard, Fabio Estevam, Guoxiong Yan, linux-media



On 09/21/2015 08:47 AM, Sudeep Holla wrote:
> This driver doesn't claim the IR transmitter to be wakeup source. It
> even disables the clock and the IR during suspend-resume cycle.
>
> This patch removes yet another misuse of IRQF_NO_SUSPEND.
>
> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Guoxiong Yan <yanguoxiong@huawei.com>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>   drivers/media/rc/ir-hix5hd2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
> index 1c087cb76815..d0549fba711c 100644
> --- a/drivers/media/rc/ir-hix5hd2.c
> +++ b/drivers/media/rc/ir-hix5hd2.c
> @@ -257,7 +257,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
>   		goto clkerr;
>
>   	if (devm_request_irq(dev, priv->irq, hix5hd2_ir_rx_interrupt,
> -			     IRQF_NO_SUSPEND, pdev->name, priv) < 0) {
> +			     0, pdev->name, priv) < 0) {
>   		dev_err(dev, "IRQ %d register failed\n", priv->irq);
>   		ret = -EINVAL;
>   		goto regerr;
>

ir is wakeup source for hix5hd2, so we use IRQF_NO_SUSPEND.
However, it is true the wakeup mechanism is not realized on hix5hd2 yet.
I am fine with either using IRQF_NO_SUSPEND or not.

Thanks for the patch.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 15/17] ir-hix5hd2: drop the use of IRQF_NO_SUSPEND
  2015-09-23 14:26   ` zhangfei
@ 2015-09-23 14:37     ` Sudeep Holla
  2015-09-23 14:50       ` zhangfei
  0 siblings, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-09-23 14:37 UTC (permalink / raw)
  To: zhangfei, linux-pm, linux-kernel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Mauro Carvalho Chehab, Patrice Chotard, Fabio Estevam,
	Guoxiong Yan, linux-media



On 23/09/15 15:26, zhangfei wrote:
>
>
> On 09/21/2015 08:47 AM, Sudeep Holla wrote:
>> This driver doesn't claim the IR transmitter to be wakeup source. It
>> even disables the clock and the IR during suspend-resume cycle.
>>
>> This patch removes yet another misuse of IRQF_NO_SUSPEND.
>>
>> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
>> Cc: Patrice Chotard <patrice.chotard@st.com>
>> Cc: Fabio Estevam <fabio.estevam@freescale.com>
>> Cc: Guoxiong Yan <yanguoxiong@huawei.com>
>> Cc: linux-media@vger.kernel.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>>    drivers/media/rc/ir-hix5hd2.c | 2 +-
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
>> index 1c087cb76815..d0549fba711c 100644
>> --- a/drivers/media/rc/ir-hix5hd2.c
>> +++ b/drivers/media/rc/ir-hix5hd2.c
>> @@ -257,7 +257,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
>>    		goto clkerr;
>>
>>    	if (devm_request_irq(dev, priv->irq, hix5hd2_ir_rx_interrupt,
>> -			     IRQF_NO_SUSPEND, pdev->name, priv) < 0) {
>> +			     0, pdev->name, priv) < 0) {
>>    		dev_err(dev, "IRQ %d register failed\n", priv->irq);
>>    		ret = -EINVAL;
>>    		goto regerr;
>>
>
> ir is wakeup source for hix5hd2, so we use IRQF_NO_SUSPEND.

OK, but from the existing implementation of suspend/resume callbacks, I
read that the clocks as well as the IP block is powered off. Is part of
the logic always-on ?

> However, it is true the wakeup mechanism is not realized on hix5hd2 yet.

OK, then I assume you can add the right APIs(enable_irq_wake and
friends) when you add that feature.

> I am fine with either using IRQF_NO_SUSPEND or not.
>

No using IRQF_NO_SUSPEND for wakeup is simply wrong and hence this patch
series removes all those misuse. If you need it as wakeup, then you need
to use right APIs for that. Since I don't see any support for wakeup in
this driver I decided to just remove the flag. Please feel free to add
the support making use of right APIs.

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 15/17] ir-hix5hd2: drop the use of IRQF_NO_SUSPEND
  2015-09-23 14:37     ` Sudeep Holla
@ 2015-09-23 14:50       ` zhangfei
  0 siblings, 0 replies; 110+ messages in thread
From: zhangfei @ 2015-09-23 14:50 UTC (permalink / raw)
  To: Sudeep Holla, linux-pm, linux-kernel
  Cc: Thomas Gleixner, Rafael J. Wysocki, Mauro Carvalho Chehab,
	Patrice Chotard, Fabio Estevam, Guoxiong Yan, linux-media



On 09/23/2015 07:37 AM, Sudeep Holla wrote:
>
>
> On 23/09/15 15:26, zhangfei wrote:
>>
>>
>> On 09/21/2015 08:47 AM, Sudeep Holla wrote:
>>> This driver doesn't claim the IR transmitter to be wakeup source. It
>>> even disables the clock and the IR during suspend-resume cycle.
>>>
>>> This patch removes yet another misuse of IRQF_NO_SUSPEND.
>>>
>>> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>>> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
>>> Cc: Patrice Chotard <patrice.chotard@st.com>
>>> Cc: Fabio Estevam <fabio.estevam@freescale.com>
>>> Cc: Guoxiong Yan <yanguoxiong@huawei.com>
>>> Cc: linux-media@vger.kernel.org
>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>

>>> ---
>>>    drivers/media/rc/ir-hix5hd2.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/media/rc/ir-hix5hd2.c
>>> b/drivers/media/rc/ir-hix5hd2.c
>>> index 1c087cb76815..d0549fba711c 100644
>>> --- a/drivers/media/rc/ir-hix5hd2.c
>>> +++ b/drivers/media/rc/ir-hix5hd2.c
>>> @@ -257,7 +257,7 @@ static int hix5hd2_ir_probe(struct
>>> platform_device *pdev)
>>>            goto clkerr;
>>>
>>>        if (devm_request_irq(dev, priv->irq, hix5hd2_ir_rx_interrupt,
>>> -                 IRQF_NO_SUSPEND, pdev->name, priv) < 0) {
>>> +                 0, pdev->name, priv) < 0) {
>>>            dev_err(dev, "IRQ %d register failed\n", priv->irq);
>>>            ret = -EINVAL;
>>>            goto regerr;
>>>
>>
>> ir is wakeup source for hix5hd2, so we use IRQF_NO_SUSPEND.
>
> OK, but from the existing implementation of suspend/resume callbacks, I
> read that the clocks as well as the IP block is powered off. Is part of
> the logic always-on ?
>
>> However, it is true the wakeup mechanism is not realized on hix5hd2 yet.
>
> OK, then I assume you can add the right APIs(enable_irq_wake and
> friends) when you add that feature.
>
>> I am fine with either using IRQF_NO_SUSPEND or not.
>>
>
> No using IRQF_NO_SUSPEND for wakeup is simply wrong and hence this patch
> series removes all those misuse. If you need it as wakeup, then you need
> to use right APIs for that. Since I don't see any support for wakeup in
> this driver I decided to just remove the flag. Please feel free to add
> the support making use of right APIs.

Thanks Sudeep for the kind info.
Yes, you are right.

Thanks

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND
  2015-09-21 15:47 ` [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Sudeep Holla
@ 2015-09-23 15:32   ` Guenter Roeck
  0 siblings, 0 replies; 110+ messages in thread
From: Guenter Roeck @ 2015-09-23 15:32 UTC (permalink / raw)
  To: Sudeep Holla, linux-pm, linux-kernel
  Cc: Thomas Gleixner, Rafael J. Wysocki, Jean Delvare, lm-sensors

On 09/21/2015 08:47 AM, Sudeep Holla wrote:
> The description in the driver states: "ABX500 does not provide auto ADC,
> so to monitor the required temperatures, a periodic work is used. It is
> more important to not wake up the CPU... If the chip gets too hot during
> a sleep state it's most likely due to external factors, such as the
> surrounding temperature and nothing can be done in S/W."
>
> So it makes no sense to keep IRQs enabled as it need not be wakeup
> source. This patch removes the use of IRQF_NO_SUSPEND flag
>
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: lm-sensors@lm-sensors.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>   drivers/hwmon/abx500.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c
> index 6cb89c0ebab6..dcab258f60c1 100644
> --- a/drivers/hwmon/abx500.c
> +++ b/drivers/hwmon/abx500.c
> @@ -377,7 +377,7 @@ static int setup_irqs(struct platform_device *pdev)
>   	}
>
>   	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
> -		abx500_temp_irq_handler, IRQF_NO_SUSPEND, "abx500-temp", pdev);
> +		abx500_temp_irq_handler, 0, "abx500-temp", pdev);
>   	if (ret < 0)
>   		dev_err(&pdev->dev, "Request threaded irq failed (%d)\n", ret);
>
>


^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 16:51     ` Thomas Gleixner
  2015-09-22 14:04       ` Manoil Claudiu
@ 2015-09-23 21:20       ` Li Yang
  2015-09-23 22:03         ` Thomas Gleixner
  1 sibling, 1 reply; 110+ messages in thread
From: Li Yang @ 2015-09-23 21:20 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Manoil Claudiu, Sudeep Holla, linux-pm, linux-kernel,
	Rafael J. Wysocki, David S. Miller, Kevin Hao, netdev

On Mon, Sep 21, 2015 at 11:51 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Mon, 21 Sep 2015, Manoil Claudiu wrote:
>> >The device is set as wakeup capable using proper wakeup API but the
>> >driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
>> >which is incorrect.
>> >
>> >This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
>> >enable_irq_wake instead.
>> >
>>
>> What would be the purpose of IRQF_NO_SUSPEND flag then?  The flag is a
>> friendlier API compared to calling enable_irq_wake().  For older kernels,
>
> It's not an API, it's just a bandaid for lazy programmers.
>
>> on PPC architectures, the flag did the job.  When did this change? Since
>> when using IRQF_NO_SUSPEND is a "misuse"?
>
> It always was. Simply because IRQF_NO_SUSPEND has absolutely nothing
> to do with wakeup interrupt sources. It's a flag which excludes the
> interrupt from the suspend mechanism, but it does not flag it a wakeup
> source.

It was not very clear on the intended use of IRQF_NO_SUSPEND at the
beginning as it was not documented anywhere.  It's good that we have
the Documentation/power/suspend-and-interrupts.txt to clarify that
now.

Regards,
Leo

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-23 21:20       ` Li Yang
@ 2015-09-23 22:03         ` Thomas Gleixner
  2015-09-24 21:17           ` Li Yang
  0 siblings, 1 reply; 110+ messages in thread
From: Thomas Gleixner @ 2015-09-23 22:03 UTC (permalink / raw)
  To: Li Yang
  Cc: Manoil Claudiu, Sudeep Holla, linux-pm, linux-kernel,
	Rafael J. Wysocki, David S. Miller, Kevin Hao, netdev

On Wed, 23 Sep 2015, Li Yang wrote:
> On Mon, Sep 21, 2015 at 11:51 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Mon, 21 Sep 2015, Manoil Claudiu wrote:
> >> >The device is set as wakeup capable using proper wakeup API but the
> >> >driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
> >> >which is incorrect.
> >> >
> >> >This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
> >> >enable_irq_wake instead.
> >> >
> >>
> >> What would be the purpose of IRQF_NO_SUSPEND flag then?  The flag is a
> >> friendlier API compared to calling enable_irq_wake().  For older kernels,
> >
> > It's not an API, it's just a bandaid for lazy programmers.
> >
> >> on PPC architectures, the flag did the job.  When did this change? Since
> >> when using IRQF_NO_SUSPEND is a "misuse"?
> >
> > It always was. Simply because IRQF_NO_SUSPEND has absolutely nothing
> > to do with wakeup interrupt sources. It's a flag which excludes the
> > interrupt from the suspend mechanism, but it does not flag it a wakeup
> > source.
> 
> It was not very clear on the intended use of IRQF_NO_SUSPEND at the
> beginning as it was not documented anywhere.  It's good that we have
> the Documentation/power/suspend-and-interrupts.txt to clarify that
> now.

This is complete and utter bullshit to put it blunt.

The documentation of IRQF_NO_SUSPEND as non suitable for marking a
particular device interrupt as wakeup source was added on Feb 20 2015
with commit 737eb0301f2. Further clarification was added with commit
7438b633a6b on Mar 4 2015.

The IRQF_NO_SUSPEND crap was introduced to gianfar with commit
614b42426cc3 on Jul 31 2015.

Did you really expect that nobody will notice that the documentation
which you praise now, has been available FIVE month before you decided
to ignore it?

You can play your $corp fingerpointing games inside of your $corp
without someone noticing, but in that community this is an absolute
nono.

No thanks,

   tglx




^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-23 22:03         ` Thomas Gleixner
@ 2015-09-24 21:17           ` Li Yang
  0 siblings, 0 replies; 110+ messages in thread
From: Li Yang @ 2015-09-24 21:17 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Manoil Claudiu, Sudeep Holla, linux-pm, linux-kernel,
	Rafael J. Wysocki, David S. Miller, Kevin Hao, netdev

On Wed, Sep 23, 2015 at 5:03 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Wed, 23 Sep 2015, Li Yang wrote:
>> On Mon, Sep 21, 2015 at 11:51 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>> > On Mon, 21 Sep 2015, Manoil Claudiu wrote:
>> >> >The device is set as wakeup capable using proper wakeup API but the
>> >> >driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
>> >> >which is incorrect.
>> >> >
>> >> >This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
>> >> >enable_irq_wake instead.
>> >> >
>> >>
>> >> What would be the purpose of IRQF_NO_SUSPEND flag then?  The flag is a
>> >> friendlier API compared to calling enable_irq_wake().  For older kernels,
>> >
>> > It's not an API, it's just a bandaid for lazy programmers.
>> >
>> >> on PPC architectures, the flag did the job.  When did this change? Since
>> >> when using IRQF_NO_SUSPEND is a "misuse"?
>> >
>> > It always was. Simply because IRQF_NO_SUSPEND has absolutely nothing
>> > to do with wakeup interrupt sources. It's a flag which excludes the
>> > interrupt from the suspend mechanism, but it does not flag it a wakeup
>> > source.
>>
>> It was not very clear on the intended use of IRQF_NO_SUSPEND at the
>> beginning as it was not documented anywhere.  It's good that we have
>> the Documentation/power/suspend-and-interrupts.txt to clarify that
>> now.
>
> This is complete and utter bullshit to put it blunt.
>
> The documentation of IRQF_NO_SUSPEND as non suitable for marking a
> particular device interrupt as wakeup source was added on Feb 20 2015
> with commit 737eb0301f2. Further clarification was added with commit
> 7438b633a6b on Mar 4 2015.
>
> The IRQF_NO_SUSPEND crap was introduced to gianfar with commit
> 614b42426cc3 on Jul 31 2015.

It is definitely an oversight of us to have missed the new development
on this topic.  It's a problem for us and I'm not trying to defend
that.  But the decision to use IRQF_NO_SUSPEND for wakeup interrupt
was made several years ago. (https://lkml.org/lkml/2012/7/20/174)  I
was just trying to say that it's hard to make the right decision at
the beginning.

Regards,
Leo

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:47 ` [PATCH 13/17] net: gianfar: " Sudeep Holla
  2015-09-21 16:24   ` Manoil Claudiu
@ 2015-09-24 21:23   ` David Miller
  1 sibling, 0 replies; 110+ messages in thread
From: David Miller @ 2015-09-24 21:23 UTC (permalink / raw)
  To: sudeep.holla
  Cc: linux-pm, linux-kernel, tglx, rjw, claudiu.manoil, haokexin, netdev

From: Sudeep Holla <sudeep.holla@arm.com>
Date: Mon, 21 Sep 2015 16:47:09 +0100

> The device is set as wakeup capable using proper wakeup API but the
> driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
> which is incorrect.
> 
> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
> enable_irq_wake instead.
> 
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
> Cc: Kevin Hao <haokexin@gmail.com>
> Cc: netdev@vger.kernel.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 07/17][UPDATE] mfd: qcom_rpm: Drop use of IRQF_NO_SUSPEND flag
  2015-09-21 15:47 ` [PATCH 07/17] input: tegra-kbc: drop use " Sudeep Holla
  2015-09-21 23:21   ` Lee Jones
@ 2015-09-25 12:39   ` Sudeep Holla
  2015-09-25 16:08     ` Lee Jones
  1 sibling, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-09-25 12:39 UTC (permalink / raw)
  To: Lee Jones, linux-pm, linux-kernel
  Cc: Thomas Gleixner, Rafael J. Wysocki, Sudeep Holla, Samuel Ortiz

The driver handles wakeup irq correctly using irq_set_irq_wake. There's
no need to use IRQF_NO_SUSPEND while registering the interrupt.

This patch removes the use of IRQF_NO_SUSPEND flag.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/mfd/qcom_rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Updated version with the $subject fixed and Lee's ACK.

diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c
index 6afc9fabd94c..207a3bd68559 100644
--- a/drivers/mfd/qcom_rpm.c
+++ b/drivers/mfd/qcom_rpm.c
@@ -550,7 +550,7 @@ static int qcom_rpm_probe(struct platform_device *pdev)
 	ret = devm_request_irq(&pdev->dev,
 			       irq_ack,
 			       qcom_rpm_ack_interrupt,
-			       IRQF_TRIGGER_RISING | IRQF_NO_SUSPEND,
+			       IRQF_TRIGGER_RISING,
 			       "qcom_rpm_ack",
 			       rpm);
 	if (ret) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 110+ messages in thread

* Re: [PATCH 07/17][UPDATE] mfd: qcom_rpm: Drop use of IRQF_NO_SUSPEND flag
  2015-09-25 12:39   ` [PATCH 07/17][UPDATE] mfd: qcom_rpm: Drop " Sudeep Holla
@ 2015-09-25 16:08     ` Lee Jones
  0 siblings, 0 replies; 110+ messages in thread
From: Lee Jones @ 2015-09-25 16:08 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki, Samuel Ortiz

On Fri, 25 Sep 2015, Sudeep Holla wrote:

> The driver handles wakeup irq correctly using irq_set_irq_wake. There's
> no need to use IRQF_NO_SUSPEND while registering the interrupt.
> 
> This patch removes the use of IRQF_NO_SUSPEND flag.
> 
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/mfd/qcom_rpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Updated version with the $subject fixed and Lee's ACK.

Applied, thanks.

> diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c
> index 6afc9fabd94c..207a3bd68559 100644
> --- a/drivers/mfd/qcom_rpm.c
> +++ b/drivers/mfd/qcom_rpm.c
> @@ -550,7 +550,7 @@ static int qcom_rpm_probe(struct platform_device *pdev)
>  	ret = devm_request_irq(&pdev->dev,
>  			       irq_ack,
>  			       qcom_rpm_ack_interrupt,
> -			       IRQF_TRIGGER_RISING | IRQF_NO_SUSPEND,
> +			       IRQF_TRIGGER_RISING,
>  			       "qcom_rpm_ack",
>  			       rpm);
>  	if (ret) {

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
@ 2015-10-02 10:40     ` Linus Walleij
  -1 siblings, 0 replies; 110+ messages in thread
From: Linus Walleij @ 2015-10-02 10:40 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

On Mon, Sep 21, 2015 at 8:46 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:

> 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>

Looks correct to me.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [rtc-linux] Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-02 10:40     ` Linus Walleij
  0 siblings, 0 replies; 110+ messages in thread
From: Linus Walleij @ 2015-10-02 10:40 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

On Mon, Sep 21, 2015 at 8:46 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:

> 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>

Looks correct to me.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
@ 2015-10-02 10:41     ` Linus Walleij
  -1 siblings, 0 replies; 110+ messages in thread
From: Linus Walleij @ 2015-10-02 10:41 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

On Mon, Sep 21, 2015 at 8:46 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:

> 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>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [rtc-linux] Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-02 10:41     ` Linus Walleij
  0 siblings, 0 replies; 110+ messages in thread
From: Linus Walleij @ 2015-10-02 10:41 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

On Mon, Sep 21, 2015 at 8:46 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:

> 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>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
  2015-10-02 10:40     ` [rtc-linux] " Linus Walleij
@ 2015-10-02 10:45       ` Sudeep Holla
  -1 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-02 10:45 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Sudeep Holla, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Alessandro Zummo, Alexandre Belloni,
	rtc-linux



On 02/10/15 11:40, Linus Walleij wrote:
> On Mon, Sep 21, 2015 at 8:46 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
>> 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>
>
> Looks correct to me.
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>

Thanks, while you are at it, do you know what interrupt stv2_pl031
shares so that I can fix the TODO in the comment or the code(whichever
applicable).

Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [rtc-linux] Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-02 10:45       ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-02 10:45 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Sudeep Holla, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Alessandro Zummo, Alexandre Belloni,
	rtc-linux



On 02/10/15 11:40, Linus Walleij wrote:
> On Mon, Sep 21, 2015 at 8:46 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
>> 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>
>
> Looks correct to me.
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>

Thanks, while you are at it, do you know what interrupt stv2_pl031
shares so that I can fix the TODO in the comment or the code(whichever
applicable).

Regards,
Sudeep

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
  2015-10-02 10:45       ` [rtc-linux] " Sudeep Holla
@ 2015-10-02 13:16         ` Alexandre Belloni
  -1 siblings, 0 replies; 110+ messages in thread
From: Alexandre Belloni @ 2015-10-02 13:16 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Linus Walleij, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Alessandro Zummo, rtc-linux

On 02/10/2015 at 11:45:18 +0100, Sudeep Holla wrote :
> 
> 
> On 02/10/15 11:40, Linus Walleij wrote:
> >On Mon, Sep 21, 2015 at 8:46 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> >>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>
> >
> >Looks correct to me.
> >Acked-by: Linus Walleij <linus.walleij@linaro.org>
> >
> 
> Thanks, while you are at it, do you know what interrupt stv2_pl031
> shares so that I can fix the TODO in the comment or the code(whichever
> applicable).
> 

So that you know, I'm planning to apply them this weekend, I couldn't
find time to do it before.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [rtc-linux] Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-02 13:16         ` Alexandre Belloni
  0 siblings, 0 replies; 110+ messages in thread
From: Alexandre Belloni @ 2015-10-02 13:16 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Linus Walleij, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Alessandro Zummo, rtc-linux

On 02/10/2015 at 11:45:18 +0100, Sudeep Holla wrote :
> 
> 
> On 02/10/15 11:40, Linus Walleij wrote:
> >On Mon, Sep 21, 2015 at 8:46 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> >>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>
> >
> >Looks correct to me.
> >Acked-by: Linus Walleij <linus.walleij@linaro.org>
> >
> 
> Thanks, while you are at it, do you know what interrupt stv2_pl031
> shares so that I can fix the TODO in the comment or the code(whichever
> applicable).
> 

So that you know, I'm planning to apply them this weekend, I couldn't
find time to do it before.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
@ 2015-10-03 15:20     ` Alexandre Belloni
  -1 siblings, 0 replies; 110+ messages in thread
From: Alexandre Belloni @ 2015-10-03 15:20 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Linus Walleij, Alessandro Zummo, rtc-linux

On 21/09/2015 at 16:46:57 +0100, Sudeep Holla wrote :
> 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-pl031.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [rtc-linux] Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-03 15:20     ` Alexandre Belloni
  0 siblings, 0 replies; 110+ messages in thread
From: Alexandre Belloni @ 2015-10-03 15:20 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Linus Walleij, Alessandro Zummo, rtc-linux

On 21/09/2015 at 16:46:57 +0100, Sudeep Holla wrote :
> 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-pl031.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
@ 2015-10-03 15:20     ` Alexandre Belloni
  -1 siblings, 0 replies; 110+ messages in thread
From: Alexandre Belloni @ 2015-10-03 15:20 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Linus Walleij, Alessandro Zummo, rtc-linux

On 21/09/2015 at 16:46:58 +0100, Sudeep Holla wrote :
> 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(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [rtc-linux] Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-03 15:20     ` Alexandre Belloni
  0 siblings, 0 replies; 110+ messages in thread
From: Alexandre Belloni @ 2015-10-03 15:20 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Linus Walleij, Alessandro Zummo, rtc-linux

On 21/09/2015 at 16:46:58 +0100, Sudeep Holla wrote :
> 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(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 06/17] rtc: ds1343: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:47   ` [rtc-linux] " Sudeep Holla
@ 2015-10-03 15:20     ` Alexandre Belloni
  -1 siblings, 0 replies; 110+ messages in thread
From: Alexandre Belloni @ 2015-10-03 15:20 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, rtc-linux

On 21/09/2015 at 16:47:02 +0100, Sudeep Holla wrote :
> 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: 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-ds1343.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [rtc-linux] Re: [PATCH 06/17] rtc: ds1343: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-03 15:20     ` Alexandre Belloni
  0 siblings, 0 replies; 110+ messages in thread
From: Alexandre Belloni @ 2015-10-03 15:20 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, rtc-linux

On 21/09/2015 at 16:47:02 +0100, Sudeep Holla wrote :
> 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: 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-ds1343.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:47 ` [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-10-03 16:09   ` Darren Hart
  0 siblings, 0 replies; 110+ messages in thread
From: Darren Hart @ 2015-10-03 16:09 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	platform-driver-x86

On Mon, Sep 21, 2015 at 04:47:01PM +0100, Sudeep Holla wrote:
> 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: Darren Hart <dvhart@infradead.org>
> Cc: platform-driver-x86@vger.kernel.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

Queued to testing, thanks Sudeep.

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 ` [PATCH 03/17] input: tegra-kbc: drop use " Sudeep Holla
@ 2015-10-05  5:44   ` Thierry Reding
  2015-10-05 10:24     ` Laxman Dewangan
  1 sibling, 0 replies; 110+ messages in thread
From: Thierry Reding @ 2015-10-05  5:44 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Laxman Dewangan, Stephen Warren, linux-input, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

On Mon, Sep 21, 2015 at 04:46:59PM +0100, Sudeep Holla wrote:
> The driver handles wakeup irq correctly using device_init_wakeup and
> enable_irq_wake. There's no need to use IRQF_NO_SUSPEND while registering
> the interrupt.
> 
> This patch removes the use of IRQF_NO_SUSPEND flag.
> 
> Cc: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: linux-input@vger.kernel.org
> Cc: linux-tegra@vger.kernel.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/input/keyboard/tegra-kbc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
  2015-10-02 10:45       ` [rtc-linux] " Sudeep Holla
@ 2015-10-05  8:49         ` Linus Walleij
  -1 siblings, 0 replies; 110+ messages in thread
From: Linus Walleij @ 2015-10-05  8:49 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

On Fri, Oct 2, 2015 at 12:45 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:

>> Looks correct to me.
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Thanks, while you are at it, do you know what interrupt stv2_pl031
> shares so that I can fix the TODO in the comment or the code(whichever
> applicable).

This is shared with a hardware called RTT (real-time timer) that has
no upstream driver as of now.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [rtc-linux] Re: [PATCH 01/17] rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-05  8:49         ` Linus Walleij
  0 siblings, 0 replies; 110+ messages in thread
From: Linus Walleij @ 2015-10-05  8:49 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Alessandro Zummo, Alexandre Belloni, rtc-linux

On Fri, Oct 2, 2015 at 12:45 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:

>> Looks correct to me.
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Thanks, while you are at it, do you know what interrupt stv2_pl031
> shares so that I can fix the TODO in the comment or the code(whichever
> applicable).

This is shared with a hardware called RTT (real-time timer) that has
no upstream driver as of now.

Yours,
Linus Walleij

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-09-21 15:46 ` [PATCH 03/17] input: tegra-kbc: drop use " Sudeep Holla
@ 2015-10-05 10:24     ` Laxman Dewangan
  2015-10-05 10:24     ` Laxman Dewangan
  1 sibling, 0 replies; 110+ messages in thread
From: Laxman Dewangan @ 2015-10-05 10:24 UTC (permalink / raw)
  To: Sudeep Holla, linux-pm, linux-kernel
  Cc: Thomas Gleixner, Rafael J. Wysocki, Stephen Warren,
	Thierry Reding, linux-input, linux-tegra


On Monday 21 September 2015 09:16 PM, Sudeep Holla wrote:
>
> diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
> index f97c73bd14f8..5f5dbbd51991 100644
> --- a/drivers/input/keyboard/tegra-kbc.c
> +++ b/drivers/input/keyboard/tegra-kbc.c
> @@ -705,7 +705,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)
>   	input_set_drvdata(kbc->idev, kbc);
>   
>   	err = devm_request_irq(&pdev->dev, kbc->irq, tegra_kbc_isr,
> -			  IRQF_NO_SUSPEND | IRQF_TRIGGER_HIGH, pdev->name, kbc);
> +			       IRQF_TRIGGER_HIGH, pdev->name, kbc);
>

Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
@ 2015-10-05 10:24     ` Laxman Dewangan
  0 siblings, 0 replies; 110+ messages in thread
From: Laxman Dewangan @ 2015-10-05 10:24 UTC (permalink / raw)
  To: Sudeep Holla, linux-pm, linux-kernel
  Cc: Thomas Gleixner, Rafael J. Wysocki, Stephen Warren,
	Thierry Reding, linux-input, linux-tegra


On Monday 21 September 2015 09:16 PM, Sudeep Holla wrote:
>
> diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
> index f97c73bd14f8..5f5dbbd51991 100644
> --- a/drivers/input/keyboard/tegra-kbc.c
> +++ b/drivers/input/keyboard/tegra-kbc.c
> @@ -705,7 +705,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)
>   	input_set_drvdata(kbc->idev, kbc);
>   
>   	err = devm_request_irq(&pdev->dev, kbc->irq, tegra_kbc_isr,
> -			  IRQF_NO_SUSPEND | IRQF_TRIGGER_HIGH, pdev->name, kbc);
> +			       IRQF_TRIGGER_HIGH, pdev->name, kbc);
>

Acked-by: Laxman Dewangan <ldewangan@nvidia.com>


^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:47   ` Sudeep Holla
@ 2015-10-12 20:20     ` Tony Lindgren
  -1 siblings, 0 replies; 110+ messages in thread
From: Tony Lindgren @ 2015-10-12 20:20 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Thomas Gleixner, Rafael J. Wysocki,
	Kevin Hilman, linux-omap, linux-arm-kernel

* Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
> 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 replacing it with
> enable_irq_wake instead.

Applying into omap-for-v4.4/cleanup thanks.

Tony

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-12 20:20     ` Tony Lindgren
  0 siblings, 0 replies; 110+ messages in thread
From: Tony Lindgren @ 2015-10-12 20:20 UTC (permalink / raw)
  To: linux-arm-kernel

* Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
> 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 replacing it with
> enable_irq_wake instead.

Applying into omap-for-v4.4/cleanup thanks.

Tony

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
  2015-10-12 20:20     ` Tony Lindgren
@ 2015-10-12 20:28       ` Tony Lindgren
  -1 siblings, 0 replies; 110+ messages in thread
From: Tony Lindgren @ 2015-10-12 20:28 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, Kevin Hilman, Rafael J. Wysocki, linux-kernel,
	Thomas Gleixner, linux-omap, linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [151012 13:27]:
> * Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
> > 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 replacing it with
> > enable_irq_wake instead.
> 
> Applying into omap-for-v4.4/cleanup thanks.

Actually I don't think this does the right thing. The interrupts
in the $subject patch are in the always on powerdomain, and we really
want them to be excluded from the suspend.

So not applying without further explanations.

Regards,

Tony

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-12 20:28       ` Tony Lindgren
  0 siblings, 0 replies; 110+ messages in thread
From: Tony Lindgren @ 2015-10-12 20:28 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [151012 13:27]:
> * Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
> > 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 replacing it with
> > enable_irq_wake instead.
> 
> Applying into omap-for-v4.4/cleanup thanks.

Actually I don't think this does the right thing. The interrupts
in the $subject patch are in the always on powerdomain, and we really
want them to be excluded from the suspend.

So not applying without further explanations.

Regards,

Tony

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
  2015-10-12 20:28       ` Tony Lindgren
@ 2015-10-13 10:42         ` Sudeep Holla
  -1 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-13 10:42 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Sudeep Holla, linux-pm, Kevin Hilman, Rafael J. Wysocki,
	linux-kernel, Thomas Gleixner, linux-omap, linux-arm-kernel



On 12/10/15 21:28, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [151012 13:27]:
>> * Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
>>> 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 replacing it with
>>> enable_irq_wake instead.
>>
>> Applying into omap-for-v4.4/cleanup thanks.
>
> Actually I don't think this does the right thing. The interrupts
> in the $subject patch are in the always on powerdomain, and we really

Agreed

> want them to be excluded from the suspend.
>

OK but what's wrong with this patch. At-least the name suggest it's a
wakeup interrupt. And using IRQF_NO_SUSPEND for the wakeup interrupt is
simply wrong.

> So not applying without further explanations.
>

But I don't understand the real need for IRQF_NO_SUSPEND over wakeup APIs ?

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-13 10:42         ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-13 10:42 UTC (permalink / raw)
  To: linux-arm-kernel



On 12/10/15 21:28, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [151012 13:27]:
>> * Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
>>> 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 replacing it with
>>> enable_irq_wake instead.
>>
>> Applying into omap-for-v4.4/cleanup thanks.
>
> Actually I don't think this does the right thing. The interrupts
> in the $subject patch are in the always on powerdomain, and we really

Agreed

> want them to be excluded from the suspend.
>

OK but what's wrong with this patch. At-least the name suggest it's a
wakeup interrupt. And using IRQF_NO_SUSPEND for the wakeup interrupt is
simply wrong.

> So not applying without further explanations.
>

But I don't understand the real need for IRQF_NO_SUSPEND over wakeup APIs ?

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
  2015-10-13 10:42         ` Sudeep Holla
@ 2015-10-13 14:53           ` Tony Lindgren
  -1 siblings, 0 replies; 110+ messages in thread
From: Tony Lindgren @ 2015-10-13 14:53 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, Kevin Hilman, Rafael J. Wysocki, linux-kernel,
	Thomas Gleixner, linux-omap, linux-arm-kernel

* Sudeep Holla <sudeep.holla@arm.com> [151013 03:46]:
> 
> 
> On 12/10/15 21:28, Tony Lindgren wrote:
> >* Tony Lindgren <tony@atomide.com> [151012 13:27]:
> >>* Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
> >>>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 replacing it with
> >>>enable_irq_wake instead.
> >>
> >>Applying into omap-for-v4.4/cleanup thanks.
> >
> >Actually I don't think this does the right thing. The interrupts
> >in the $subject patch are in the always on powerdomain, and we really
> 
> Agreed
> 
> >want them to be excluded from the suspend.
> >
> 
> OK but what's wrong with this patch. At-least the name suggest it's a
> wakeup interrupt. And using IRQF_NO_SUSPEND for the wakeup interrupt is
> simply wrong.

Hmm so if we have a separate always on irq controller for the wake-up events
and we want to keep it always on and exclude it from any suspend related
things.. Why would we not use IRQF_NO_SUSPEND on it?

Above you say "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..." and that's exactly what we want to do here :)

For the dedicated wake-up interrupts, we have separate registers to enable
and disable them. The $subject irq is the shared interrupt that allows
making use of the pin specific wake-up interrupts, and for those yes we
are using enable_irq_wake().

> >So not applying without further explanations.
> >
> 
> But I don't understand the real need for IRQF_NO_SUSPEND over wakeup APIs ?

Because in the $subject case we just want to always keep it on and
never suspend it. It's unrelated to the wakeup APIs at least for the
omap related SoCs.

Regards,

Tony

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-13 14:53           ` Tony Lindgren
  0 siblings, 0 replies; 110+ messages in thread
From: Tony Lindgren @ 2015-10-13 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

* Sudeep Holla <sudeep.holla@arm.com> [151013 03:46]:
> 
> 
> On 12/10/15 21:28, Tony Lindgren wrote:
> >* Tony Lindgren <tony@atomide.com> [151012 13:27]:
> >>* Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
> >>>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 replacing it with
> >>>enable_irq_wake instead.
> >>
> >>Applying into omap-for-v4.4/cleanup thanks.
> >
> >Actually I don't think this does the right thing. The interrupts
> >in the $subject patch are in the always on powerdomain, and we really
> 
> Agreed
> 
> >want them to be excluded from the suspend.
> >
> 
> OK but what's wrong with this patch. At-least the name suggest it's a
> wakeup interrupt. And using IRQF_NO_SUSPEND for the wakeup interrupt is
> simply wrong.

Hmm so if we have a separate always on irq controller for the wake-up events
and we want to keep it always on and exclude it from any suspend related
things.. Why would we not use IRQF_NO_SUSPEND on it?

Above you say "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..." and that's exactly what we want to do here :)

For the dedicated wake-up interrupts, we have separate registers to enable
and disable them. The $subject irq is the shared interrupt that allows
making use of the pin specific wake-up interrupts, and for those yes we
are using enable_irq_wake().

> >So not applying without further explanations.
> >
> 
> But I don't understand the real need for IRQF_NO_SUSPEND over wakeup APIs ?

Because in the $subject case we just want to always keep it on and
never suspend it. It's unrelated to the wakeup APIs at least for the
omap related SoCs.

Regards,

Tony

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
  2015-10-13 14:53           ` Tony Lindgren
  (?)
@ 2015-10-13 15:20             ` Sudeep Holla
  -1 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-13 15:20 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Sudeep Holla, linux-pm, Kevin Hilman, Rafael J. Wysocki,
	linux-kernel, Thomas Gleixner, linux-omap, linux-arm-kernel



On 13/10/15 15:53, Tony Lindgren wrote:
> * Sudeep Holla <sudeep.holla@arm.com> [151013 03:46]:
>>
>>
>> On 12/10/15 21:28, Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [151012 13:27]:
>>>> * Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
>>>>> 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 replacing it with
>>>>> enable_irq_wake instead.
>>>>
>>>> Applying into omap-for-v4.4/cleanup thanks.
>>>
>>> Actually I don't think this does the right thing. The interrupts
>>> in the $subject patch are in the always on powerdomain, and we really
>>
>> Agreed
>>
>>> want them to be excluded from the suspend.
>>>
>>
>> OK but what's wrong with this patch. At-least the name suggest it's a
>> wakeup interrupt. And using IRQF_NO_SUSPEND for the wakeup interrupt is
>> simply wrong.
>
> Hmm so if we have a separate always on irq controller for the wake-up events
> and we want to keep it always on and exclude it from any suspend related
> things.. Why would we not use IRQF_NO_SUSPEND on it?
>
> Above you say "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..." and that's exactly what we want to do here :)
>

OK if these interrupts meet that criteria to use IRQF_NO_SUSPEND, then
it should be fine, my earlier argument was based on the assumption that
it's just another wakeup interrupt.

> For the dedicated wake-up interrupts, we have separate registers to enable
> and disable them. The $subject irq is the shared interrupt that allows
> making use of the pin specific wake-up interrupts, and for those yes we
> are using enable_irq_wake().
>

If it's already take care, then fine. I am just hunting all the misuse
of IRQF_NO_SUSPEND flag especially as wakeup source and fixing them

>>> So not applying without further explanations.
>>>
>>
>> But I don't understand the real need for IRQF_NO_SUSPEND over wakeup APIs ?
>
> Because in the $subject case we just want to always keep it on and
> never suspend it. It's unrelated to the wakeup APIs at least for the
> omap related SoCs.
>

OK, understood now. Thanks

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-13 15:20             ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-13 15:20 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-pm, Kevin Hilman, Rafael J. Wysocki, linux-kernel,
	Sudeep Holla, Thomas Gleixner, linux-omap, linux-arm-kernel



On 13/10/15 15:53, Tony Lindgren wrote:
> * Sudeep Holla <sudeep.holla@arm.com> [151013 03:46]:
>>
>>
>> On 12/10/15 21:28, Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [151012 13:27]:
>>>> * Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
>>>>> 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 replacing it with
>>>>> enable_irq_wake instead.
>>>>
>>>> Applying into omap-for-v4.4/cleanup thanks.
>>>
>>> Actually I don't think this does the right thing. The interrupts
>>> in the $subject patch are in the always on powerdomain, and we really
>>
>> Agreed
>>
>>> want them to be excluded from the suspend.
>>>
>>
>> OK but what's wrong with this patch. At-least the name suggest it's a
>> wakeup interrupt. And using IRQF_NO_SUSPEND for the wakeup interrupt is
>> simply wrong.
>
> Hmm so if we have a separate always on irq controller for the wake-up events
> and we want to keep it always on and exclude it from any suspend related
> things.. Why would we not use IRQF_NO_SUSPEND on it?
>
> Above you say "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..." and that's exactly what we want to do here :)
>

OK if these interrupts meet that criteria to use IRQF_NO_SUSPEND, then
it should be fine, my earlier argument was based on the assumption that
it's just another wakeup interrupt.

> For the dedicated wake-up interrupts, we have separate registers to enable
> and disable them. The $subject irq is the shared interrupt that allows
> making use of the pin specific wake-up interrupts, and for those yes we
> are using enable_irq_wake().
>

If it's already take care, then fine. I am just hunting all the misuse
of IRQF_NO_SUSPEND flag especially as wakeup source and fixing them

>>> So not applying without further explanations.
>>>
>>
>> But I don't understand the real need for IRQF_NO_SUSPEND over wakeup APIs ?
>
> Because in the $subject case we just want to always keep it on and
> never suspend it. It's unrelated to the wakeup APIs at least for the
> omap related SoCs.
>

OK, understood now. Thanks

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 12/17] ARM: OMAP2+: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-13 15:20             ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-13 15:20 UTC (permalink / raw)
  To: linux-arm-kernel



On 13/10/15 15:53, Tony Lindgren wrote:
> * Sudeep Holla <sudeep.holla@arm.com> [151013 03:46]:
>>
>>
>> On 12/10/15 21:28, Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [151012 13:27]:
>>>> * Sudeep Holla <sudeep.holla@arm.com> [150921 08:52]:
>>>>> 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 replacing it with
>>>>> enable_irq_wake instead.
>>>>
>>>> Applying into omap-for-v4.4/cleanup thanks.
>>>
>>> Actually I don't think this does the right thing. The interrupts
>>> in the $subject patch are in the always on powerdomain, and we really
>>
>> Agreed
>>
>>> want them to be excluded from the suspend.
>>>
>>
>> OK but what's wrong with this patch. At-least the name suggest it's a
>> wakeup interrupt. And using IRQF_NO_SUSPEND for the wakeup interrupt is
>> simply wrong.
>
> Hmm so if we have a separate always on irq controller for the wake-up events
> and we want to keep it always on and exclude it from any suspend related
> things.. Why would we not use IRQF_NO_SUSPEND on it?
>
> Above you say "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..." and that's exactly what we want to do here :)
>

OK if these interrupts meet that criteria to use IRQF_NO_SUSPEND, then
it should be fine, my earlier argument was based on the assumption that
it's just another wakeup interrupt.

> For the dedicated wake-up interrupts, we have separate registers to enable
> and disable them. The $subject irq is the shared interrupt that allows
> making use of the pin specific wake-up interrupts, and for those yes we
> are using enable_irq_wake().
>

If it's already take care, then fine. I am just hunting all the misuse
of IRQF_NO_SUSPEND flag especially as wakeup source and fixing them

>>> So not applying without further explanations.
>>>
>>
>> But I don't understand the real need for IRQF_NO_SUSPEND over wakeup APIs ?
>
> Because in the $subject case we just want to always keep it on and
> never suspend it. It's unrelated to the wakeup APIs at least for the
> omap related SoCs.
>

OK, understood now. Thanks

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-10-05 10:24     ` Laxman Dewangan
  (?)
@ 2015-10-19 17:34     ` Sudeep Holla
  2015-10-26  8:37       ` Dmitry Torokhov
  -1 siblings, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-10-19 17:34 UTC (permalink / raw)
  To: linux-pm, linux-kernel, Dmitry Torokhov
  Cc: Laxman Dewangan, Sudeep Holla, Thomas Gleixner,
	Rafael J. Wysocki, Stephen Warren, Thierry Reding, linux-input,
	linux-tegra

Hi Dmitry,

On 05/10/15 11:24, Laxman Dewangan wrote:
>
> On Monday 21 September 2015 09:16 PM, Sudeep Holla wrote:
>>
>> diff --git a/drivers/input/keyboard/tegra-kbc.c
>> b/drivers/input/keyboard/tegra-kbc.c
>> index f97c73bd14f8..5f5dbbd51991 100644
>> --- a/drivers/input/keyboard/tegra-kbc.c
>> +++ b/drivers/input/keyboard/tegra-kbc.c
>> @@ -705,7 +705,7 @@ static int tegra_kbc_probe(struct platform_device
>> *pdev)
>>       input_set_drvdata(kbc->idev, kbc);
>>       err = devm_request_irq(&pdev->dev, kbc->irq, tegra_kbc_isr,
>> -              IRQF_NO_SUSPEND | IRQF_TRIGGER_HIGH, pdev->name, kbc);
>> +                   IRQF_TRIGGER_HIGH, pdev->name, kbc);
>>
>
> Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
>

Can you pick this up with all the Acks ?

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-09-23  4:06     ` Scott Wood
  (?)
@ 2015-10-19 17:35     ` Sudeep Holla
  2015-10-19 17:46       ` Scott Wood
  -1 siblings, 1 reply; 110+ messages in thread
From: Sudeep Holla @ 2015-10-19 17:35 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Scott Wood, Sudeep Holla, linux-pm, linux-kernel,
	Thomas Gleixner, Rafael J. Wysocki, Paul Mackerras,
	Michael Ellerman, Hongtao Jia, Marc Zyngier, linuxppc-dev,
	Wang Dongsheng-B40534

Hi Ben,

On 23/09/15 05:06, Scott Wood wrote:
> On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
>> mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
>> flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
>> is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
>> as it doesn't guarantee wakeup for that interrupt.
>>
>> This patch removes the redundant mpic_irq_set_wake and sets the
>> IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.
>>
>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> Cc: Paul Mackerras <paulus@samba.org>
>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>> Cc: Scott Wood <scottwood@freescale.com>
>> Cc: Hongtao Jia <hongtao.jia@freescale.com>
>> Cc: Marc Zyngier <marc.zyngier@arm.com>
>> Cc: linuxppc-dev@lists.ozlabs.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>>   arch/powerpc/sysdev/mpic.c | 23 ++++-------------------
>>   1 file changed, 4 insertions(+), 19 deletions(-)
>
> Acked-by: Scott Wood <scottwood@freescale.com>
>

Can you pick this up via your tree ?

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 11/17] pm: bf609: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:47 ` [PATCH 11/17] pm: bf609: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
@ 2015-10-19 17:38     ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-19 17:38 UTC (permalink / raw)
  To: linux-pm, linux-kernel, Steven Miao, adi-buildroot-devel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki



On 21/09/15 16:47, Sudeep Holla wrote:
> 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 replacing it with
> enable_irq_wake instead.
>
> Cc: Steven Miao <realmz6@gmail.com>

Gentle Ping !

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 11/17] pm: bf609: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-19 17:38     ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-19 17:38 UTC (permalink / raw)
  To: linux-pm, linux-kernel, Steven Miao, adi-buildroot-devel
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki



On 21/09/15 16:47, Sudeep Holla wrote:
> 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 replacing it with
> enable_irq_wake instead.
>
> Cc: Steven Miao <realmz6@gmail.com>

Gentle Ping !

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag
  2015-09-21 15:47   ` Sudeep Holla
  (?)
@ 2015-10-19 17:40     ` Sudeep Holla
  -1 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-19 17:40 UTC (permalink / raw)
  To: linux-pm, linux-kernel, Mauro Carvalho Chehab
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	linux-arm-kernel, kernel, linux-media

Hi,

On 21/09/15 16:47, Sudeep Holla wrote:
> The device is set as wakeup capable using proper wakeup API but the
> driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
> which is incorrect.
>
> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
> enable_irq_wake instead.
>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
> Cc: Maxime Coquelin <maxime.coquelin@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Can you pick couple of these media patches ?

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-19 17:40     ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-19 17:40 UTC (permalink / raw)
  To: linux-pm, linux-kernel, Mauro Carvalho Chehab
  Cc: Sudeep Holla, Thomas Gleixner, Rafael J. Wysocki,
	Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	linux-arm-kernel, kernel, linux-media

Hi,

On 21/09/15 16:47, Sudeep Holla wrote:
> The device is set as wakeup capable using proper wakeup API but the
> driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
> which is incorrect.
>
> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
> enable_irq_wake instead.
>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
> Cc: Maxime Coquelin <maxime.coquelin@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Can you pick couple of these media patches ?

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag
@ 2015-10-19 17:40     ` Sudeep Holla
  0 siblings, 0 replies; 110+ messages in thread
From: Sudeep Holla @ 2015-10-19 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 21/09/15 16:47, Sudeep Holla wrote:
> The device is set as wakeup capable using proper wakeup API but the
> driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
> which is incorrect.
>
> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
> enable_irq_wake instead.
>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
> Cc: Maxime Coquelin <maxime.coquelin@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Can you pick couple of these media patches ?

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
  2015-10-19 17:35     ` Sudeep Holla
@ 2015-10-19 17:46       ` Scott Wood
  0 siblings, 0 replies; 110+ messages in thread
From: Scott Wood @ 2015-10-19 17:46 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Benjamin Herrenschmidt, linux-pm, linux-kernel, Thomas Gleixner,
	Rafael J. Wysocki, Paul Mackerras, Michael Ellerman, Hongtao Jia,
	Marc Zyngier, linuxppc-dev, Wang Dongsheng-B40534

On Mon, 2015-10-19 at 18:35 +0100, Sudeep Holla wrote:
> Hi Ben,
> 
> On 23/09/15 05:06, Scott Wood wrote:
> > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets 
> > > IRQF_NO_SUSPEND
> > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > > as it doesn't guarantee wakeup for that interrupt.
> > > 
> > > This patch removes the redundant mpic_irq_set_wake and sets the
> > > IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.
> > > 
> > > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > > Cc: Paul Mackerras <paulus@samba.org>
> > > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > > Cc: Scott Wood <scottwood@freescale.com>
> > > Cc: Hongtao Jia <hongtao.jia@freescale.com>
> > > Cc: Marc Zyngier <marc.zyngier@arm.com>
> > > Cc: linuxppc-dev@lists.ozlabs.org
> > > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > > ---
> > >   arch/powerpc/sysdev/mpic.c | 23 ++++-------------------
> > >   1 file changed, 4 insertions(+), 19 deletions(-)
> > 
> > Acked-by: Scott Wood <scottwood@freescale.com>
> > 
> 
> Can you pick this up via your tree ?

OK.

-Scott


^ permalink raw reply	[flat|nested] 110+ messages in thread

* Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag
  2015-10-19 17:34     ` Sudeep Holla
@ 2015-10-26  8:37       ` Dmitry Torokhov
  0 siblings, 0 replies; 110+ messages in thread
From: Dmitry Torokhov @ 2015-10-26  8:37 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-pm, linux-kernel, Laxman Dewangan, Thomas Gleixner,
	Rafael J. Wysocki, Stephen Warren, Thierry Reding, linux-input,
	linux-tegra

On Mon, Oct 19, 2015 at 06:34:02PM +0100, Sudeep Holla wrote:
> Hi Dmitry,
> 
> On 05/10/15 11:24, Laxman Dewangan wrote:
> >
> >On Monday 21 September 2015 09:16 PM, Sudeep Holla wrote:
> >>
> >>diff --git a/drivers/input/keyboard/tegra-kbc.c
> >>b/drivers/input/keyboard/tegra-kbc.c
> >>index f97c73bd14f8..5f5dbbd51991 100644
> >>--- a/drivers/input/keyboard/tegra-kbc.c
> >>+++ b/drivers/input/keyboard/tegra-kbc.c
> >>@@ -705,7 +705,7 @@ static int tegra_kbc_probe(struct platform_device
> >>*pdev)
> >>      input_set_drvdata(kbc->idev, kbc);
> >>      err = devm_request_irq(&pdev->dev, kbc->irq, tegra_kbc_isr,
> >>-              IRQF_NO_SUSPEND | IRQF_TRIGGER_HIGH, pdev->name, kbc);
> >>+                   IRQF_TRIGGER_HIGH, pdev->name, kbc);
> >>
> >
> >Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
> >
> 
> Can you pick this up with all the Acks ?

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 110+ messages in thread

end of thread, other threads:[~2015-10-26  8:37 UTC | newest]

Thread overview: 110+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21 15:46 [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
2015-09-21 15:46 ` [PATCH 01/17] rtc: pl031: " Sudeep Holla
2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
2015-10-02 10:40   ` Linus Walleij
2015-10-02 10:40     ` [rtc-linux] " Linus Walleij
2015-10-02 10:45     ` Sudeep Holla
2015-10-02 10:45       ` [rtc-linux] " Sudeep Holla
2015-10-02 13:16       ` Alexandre Belloni
2015-10-02 13:16         ` [rtc-linux] " Alexandre Belloni
2015-10-05  8:49       ` Linus Walleij
2015-10-05  8:49         ` [rtc-linux] " Linus Walleij
2015-10-03 15:20   ` Alexandre Belloni
2015-10-03 15:20     ` [rtc-linux] " Alexandre Belloni
2015-09-21 15:46 ` [PATCH 02/17] rtc: ab8500: " Sudeep Holla
2015-09-21 15:46   ` [rtc-linux] " Sudeep Holla
2015-10-02 10:41   ` Linus Walleij
2015-10-02 10:41     ` [rtc-linux] " Linus Walleij
2015-10-03 15:20   ` Alexandre Belloni
2015-10-03 15:20     ` [rtc-linux] " Alexandre Belloni
2015-09-21 15:46 ` [PATCH 03/17] input: tegra-kbc: drop use " Sudeep Holla
2015-10-05  5:44   ` Thierry Reding
2015-10-05 10:24   ` Laxman Dewangan
2015-10-05 10:24     ` Laxman Dewangan
2015-10-19 17:34     ` Sudeep Holla
2015-10-26  8:37       ` Dmitry Torokhov
2015-09-21 15:47 ` [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake Sudeep Holla
2015-09-22 23:50   ` Scott Wood
2015-09-22 23:50     ` Scott Wood
2015-09-23  2:35     ` Wang Dongsheng
2015-09-23  2:35       ` Wang Dongsheng
2015-09-23  2:35       ` Wang Dongsheng
2015-09-23  3:49       ` Thomas Gleixner
2015-09-23  5:31         ` Wang Dongsheng
2015-09-23  5:31           ` Wang Dongsheng
2015-09-23  8:00           ` Thomas Gleixner
2015-09-23  4:06   ` Scott Wood
2015-09-23  4:06     ` Scott Wood
2015-10-19 17:35     ` Sudeep Holla
2015-10-19 17:46       ` Scott Wood
2015-09-21 15:47 ` [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
2015-10-03 16:09   ` Darren Hart
2015-09-21 15:47 ` [PATCH 06/17] rtc: ds1343: " Sudeep Holla
2015-09-21 15:47   ` [rtc-linux] " Sudeep Holla
2015-10-03 15:20   ` Alexandre Belloni
2015-10-03 15:20     ` [rtc-linux] " Alexandre Belloni
2015-09-21 15:47 ` [PATCH 07/17] input: tegra-kbc: drop use " Sudeep Holla
2015-09-21 23:21   ` Lee Jones
2015-09-22  0:43     ` Dmitry Torokhov
2015-09-22 21:08       ` Lee Jones
2015-09-23  8:53         ` Sudeep Holla
2015-09-22 10:00     ` Sudeep Holla
2015-09-25 12:39   ` [PATCH 07/17][UPDATE] mfd: qcom_rpm: Drop " Sudeep Holla
2015-09-25 16:08     ` Lee Jones
2015-09-21 15:47 ` [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Sudeep Holla
2015-09-23 15:32   ` Guenter Roeck
2015-09-21 15:47 ` [PATCH 09/17] MIPS: ttyFDC: replace IRQF_NO_SUSPEND with IRQF_COND_SUSPEND Sudeep Holla
2015-09-21 15:47 ` [PATCH 10/17] tty/serial: st-asc: drop the use of IRQF_NO_SUSPEND Sudeep Holla
2015-09-21 15:47   ` Sudeep Holla
2015-09-21 15:47 ` [PATCH 11/17] pm: bf609: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
2015-10-19 17:38   ` Sudeep Holla
2015-10-19 17:38     ` Sudeep Holla
2015-09-21 15:47 ` [PATCH 12/17] ARM: OMAP2+: " Sudeep Holla
2015-09-21 15:47   ` Sudeep Holla
2015-10-12 20:20   ` Tony Lindgren
2015-10-12 20:20     ` Tony Lindgren
2015-10-12 20:28     ` Tony Lindgren
2015-10-12 20:28       ` Tony Lindgren
2015-10-13 10:42       ` Sudeep Holla
2015-10-13 10:42         ` Sudeep Holla
2015-10-13 14:53         ` Tony Lindgren
2015-10-13 14:53           ` Tony Lindgren
2015-10-13 15:20           ` Sudeep Holla
2015-10-13 15:20             ` Sudeep Holla
2015-10-13 15:20             ` Sudeep Holla
2015-09-21 15:47 ` [PATCH 13/17] net: gianfar: " Sudeep Holla
2015-09-21 16:24   ` Manoil Claudiu
2015-09-21 16:38     ` Sudeep Holla
2015-09-21 16:51     ` Thomas Gleixner
2015-09-22 14:04       ` Manoil Claudiu
2015-09-22 15:09         ` Sudeep Holla
2015-09-23 21:20       ` Li Yang
2015-09-23 22:03         ` Thomas Gleixner
2015-09-24 21:17           ` Li Yang
2015-09-24 21:23   ` David Miller
2015-09-21 15:47 ` [PATCH 14/17] media: st-rc: " Sudeep Holla
2015-09-21 15:47   ` Sudeep Holla
2015-09-21 15:47   ` Sudeep Holla
2015-10-19 17:40   ` Sudeep Holla
2015-10-19 17:40     ` Sudeep Holla
2015-10-19 17:40     ` Sudeep Holla
2015-09-21 15:47 ` [PATCH 15/17] ir-hix5hd2: drop the use of IRQF_NO_SUSPEND Sudeep Holla
2015-09-23 14:26   ` zhangfei
2015-09-23 14:37     ` Sudeep Holla
2015-09-23 14:50       ` zhangfei
2015-09-21 15:47 ` [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
2015-09-21 18:53   ` Thomas Gleixner
2015-09-22  9:42     ` Sudeep Holla
2015-09-21 15:47 ` [PATCH 17/17] mfd : ab8500/db8500: fix the abuse of IRQF_NO_SUSPEND Sudeep Holla
2015-09-21 15:47   ` Sudeep Holla
2015-09-21 23:20   ` Lee Jones
2015-09-21 23:20     ` Lee Jones
2015-09-22 10:04     ` Sudeep Holla
2015-09-22 10:04       ` Sudeep Holla
2015-09-22 10:04       ` Sudeep Holla
2015-09-22 21:03       ` Lee Jones
2015-09-22 21:03         ` Lee Jones
2015-09-22 21:03         ` Lee Jones
2015-09-23  9:44         ` Sudeep Holla
2015-09-23  9:44           ` Sudeep Holla
2015-09-23  9:44           ` Sudeep Holla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.