Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229504 > unrolled thread
| Started by | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| First post | 2015-09-21 18:00 +0200 |
| Last post | 2015-10-05 12:40 +0200 |
| Articles | 13 — 7 participants |
Back to article view | Back to linux.kernel
[PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
[PATCH 09/17] MIPS: ttyFDC: replace IRQF_NO_SUSPEND with IRQF_COND_SUSPEND Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
[PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
[PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Linus Walleij <linus.walleij@linaro.org> - 2015-10-02 12:50 +0200
Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2015-10-03 17:30 +0200
[PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Guenter Roeck <linux@roeck-us.net> - 2015-09-23 17:40 +0200
[PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag Darren Hart <dvhart@infradead.org> - 2015-10-03 18:10 +0200
[PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Thierry Reding <thierry.reding@gmail.com> - 2015-10-05 07:50 +0200
Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Laxman Dewangan <ldewangan@nvidia.com> - 2015-10-05 12:40 +0200
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-21 18:00 +0200 |
| Subject | [PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qbbvQ-2wt-3@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-21 18:00 +0200 |
| Subject | [PATCH 09/17] MIPS: ttyFDC: replace IRQF_NO_SUSPEND with IRQF_COND_SUSPEND |
| Message-ID | <qbbFx-2I0-29@gated-at.bofh.it> |
| In reply to | #1229504 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-21 18:00 +0200 |
| Subject | [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qbbFw-2I0-25@gated-at.bofh.it> |
| In reply to | #1229504 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-21 18:00 +0200 |
| Subject | [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qbbFx-2I0-33@gated-at.bofh.it> |
| In reply to | #1229504 |
The IRQF_NO_SUSPEND flag is used to identify the interrupts that should
be left enabled so as to allow them to work as expected during the
suspend-resume cycle, but doesn't guarantee that it will wake the system
from a suspended state, enable_irq_wake is recommended to be used for
the wakeup.
This patch removes the use of IRQF_NO_SUSPEND flags and uses newly
introduce PM wakeup APIs dev_pm_{set,clear}_wake_irq.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: rtc-linux@googlegroups.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/rtc/rtc-ab8500.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c
index 51407c4c7bd2..24a0af650a1b 100644
--- a/drivers/rtc/rtc-ab8500.c
+++ b/drivers/rtc/rtc-ab8500.c
@@ -18,6 +18,7 @@
#include <linux/mfd/abx500/ab8500.h>
#include <linux/delay.h>
#include <linux/of.h>
+#include <linux/pm_wakeirq.h>
#define AB8500_RTC_SOFF_STAT_REG 0x00
#define AB8500_RTC_CC_CONF_REG 0x01
@@ -493,11 +494,12 @@ static int ab8500_rtc_probe(struct platform_device *pdev)
}
err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
- rtc_alarm_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
+ rtc_alarm_handler, IRQF_ONESHOT,
"ab8500-rtc", rtc);
if (err < 0)
return err;
+ dev_pm_set_wake_irq(&pdev->dev, irq);
platform_set_drvdata(pdev, rtc);
err = ab8500_sysfs_rtc_register(&pdev->dev);
@@ -513,6 +515,8 @@ static int ab8500_rtc_probe(struct platform_device *pdev)
static int ab8500_rtc_remove(struct platform_device *pdev)
{
+ dev_pm_clear_wake_irq(&pdev->dev);
+ device_init_wakeup(&pdev->dev, false);
ab8500_sysfs_rtc_unregister(&pdev->dev);
return 0;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-10-02 12:50 +0200 |
| Subject | Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qf64x-WZ-9@gated-at.bofh.it> |
| In reply to | #1229509 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2015-10-03 17:30 +0200 |
| Subject | Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qfwV4-5K3-7@gated-at.bofh.it> |
| In reply to | #1229509 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-21 18:00 +0200 |
| Subject | [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND |
| Message-ID | <qbbFx-2I0-43@gated-at.bofh.it> |
| In reply to | #1229504 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2015-09-23 17:40 +0200 |
| Subject | Re: [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND |
| Message-ID | <qbUjf-8im-11@gated-at.bofh.it> |
| In reply to | #1229510 |
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); > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-21 18:00 +0200 |
| Subject | [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qbbFx-2I0-51@gated-at.bofh.it> |
| In reply to | #1229504 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Date | 2015-10-03 18:10 +0200 |
| Subject | Re: [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag |
| Message-ID | <qfxxM-6Jn-3@gated-at.bofh.it> |
| In reply to | #1229512 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-09-21 18:00 +0200 |
| Subject | [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag |
| Message-ID | <qbbFx-2I0-45@gated-at.bofh.it> |
| In reply to | #1229504 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| Date | 2015-10-05 07:50 +0200 |
| Subject | Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag |
| Message-ID | <qg6OR-6BP-7@gated-at.bofh.it> |
| In reply to | #1229514 |
[Multipart message — attachments visible in raw view] — view raw
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>
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2015-10-05 12:40 +0200 |
| Subject | Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag |
| Message-ID | <qgblw-4JR-29@gated-at.bofh.it> |
| In reply to | #1229514 |
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> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web