Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229512
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag |
| Date | 2015-09-21 18:00 +0200 |
| Message-ID | <qbbFx-2I0-51@gated-at.bofh.it> (permalink) |
| References | <qbbvQ-2wt-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/17] PM / wakeup : remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
[PATCH 09/17] MIPS: ttyFDC: replace IRQF_NO_SUSPEND with IRQF_COND_SUSPEND Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
[PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
[PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Linus Walleij <linus.walleij@linaro.org> - 2015-10-02 12:50 +0200
Re: [PATCH 02/17] rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2015-10-03 17:30 +0200
[PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 08/17] hwmon: abx500: drop the use of IRQF_NO_SUSPEND Guenter Roeck <linux@roeck-us.net> - 2015-09-23 17:40 +0200
[PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 05/17] platform: x86: remove misuse of IRQF_NO_SUSPEND flag Darren Hart <dvhart@infradead.org> - 2015-10-03 18:10 +0200
[PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Sudeep Holla <sudeep.holla@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Thierry Reding <thierry.reding@gmail.com> - 2015-10-05 07:50 +0200
Re: [PATCH 03/17] input: tegra-kbc: drop use of IRQF_NO_SUSPEND flag Laxman Dewangan <ldewangan@nvidia.com> - 2015-10-05 12:40 +0200
csiph-web