All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: power: set IRQF_ONESHOT if no primary handler is specified
@ 2015-11-19  7:12 Saurabh Sengar
  2015-12-05  0:43 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Saurabh Sengar @ 2015-11-19  7:12 UTC (permalink / raw)
  To: sre, dbaryshkov, dwmw2, linux-pm, linux-kernel; +Cc: Saurabh Sengar

If no primary handler is specified for threaded_irq then a
default one is assigned which always returns IRQ_WAKE_THREAD.
This handler requires the IRQF_ONESHOT, because the source of
interrupt is not disabled.

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
 drivers/power/max8903_charger.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/power/max8903_charger.c b/drivers/power/max8903_charger.c
index 6d39d52..17876ca 100644
--- a/drivers/power/max8903_charger.c
+++ b/drivers/power/max8903_charger.c
@@ -291,10 +291,10 @@ static int max8903_probe(struct platform_device *pdev)
 
 	if (pdata->dc_valid) {
 		ret = devm_request_threaded_irq(dev, gpio_to_irq(pdata->dok),
-						NULL, max8903_dcin,
-						IRQF_TRIGGER_FALLING |
-						IRQF_TRIGGER_RISING,
-						"MAX8903 DC IN", data);
+					NULL, max8903_dcin,
+					IRQF_TRIGGER_FALLING |
+					IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+					"MAX8903 DC IN", data);
 		if (ret) {
 			dev_err(dev, "Cannot request irq %d for DC (%d)\n",
 					gpio_to_irq(pdata->dok), ret);
@@ -304,10 +304,10 @@ static int max8903_probe(struct platform_device *pdev)
 
 	if (pdata->usb_valid) {
 		ret = devm_request_threaded_irq(dev, gpio_to_irq(pdata->uok),
-						NULL, max8903_usbin,
-						IRQF_TRIGGER_FALLING |
-						IRQF_TRIGGER_RISING,
-						"MAX8903 USB IN", data);
+					NULL, max8903_usbin,
+					IRQF_TRIGGER_FALLING |
+					IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+					"MAX8903 USB IN", data);
 		if (ret) {
 			dev_err(dev, "Cannot request irq %d for USB (%d)\n",
 					gpio_to_irq(pdata->uok), ret);
@@ -317,10 +317,10 @@ static int max8903_probe(struct platform_device *pdev)
 
 	if (pdata->flt) {
 		ret = devm_request_threaded_irq(dev, gpio_to_irq(pdata->flt),
-						NULL, max8903_fault,
-						IRQF_TRIGGER_FALLING |
-						IRQF_TRIGGER_RISING,
-						"MAX8903 Fault", data);
+					NULL, max8903_fault,
+					IRQF_TRIGGER_FALLING |
+					IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+					"MAX8903 Fault", data);
 		if (ret) {
 			dev_err(dev, "Cannot request irq %d for Fault (%d)\n",
 					gpio_to_irq(pdata->flt), ret);
-- 
1.9.1


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

* Re: [PATCH] drivers: power: set IRQF_ONESHOT if no primary handler is specified
  2015-11-19  7:12 [PATCH] drivers: power: set IRQF_ONESHOT if no primary handler is specified Saurabh Sengar
@ 2015-12-05  0:43 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2015-12-05  0:43 UTC (permalink / raw)
  To: Saurabh Sengar; +Cc: dbaryshkov, dwmw2, linux-pm, linux-kernel

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

Hi,

On Thu, Nov 19, 2015 at 12:42:59PM +0530, Saurabh Sengar wrote:
> If no primary handler is specified for threaded_irq then a
> default one is assigned which always returns IRQ_WAKE_THREAD.
> This handler requires the IRQF_ONESHOT, because the source of
> interrupt is not disabled.

Thanks, queued.

-- Sebastian

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

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

end of thread, other threads:[~2015-12-05  0:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19  7:12 [PATCH] drivers: power: set IRQF_ONESHOT if no primary handler is specified Saurabh Sengar
2015-12-05  0:43 ` Sebastian Reichel

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.