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


Groups > linux.kernel > #1627932 > unrolled thread

[PATCH] power: supply: sbs-battery: fix the sbs interrupt request

Started byraitosyo@gmail.com
First post2017-04-21 05:20 +0200
Last post2017-04-21 05:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] power: supply: sbs-battery: fix the sbs interrupt request raitosyo@gmail.com - 2017-04-21 05:20 +0200

#1627932 — [PATCH] power: supply: sbs-battery: fix the sbs interrupt request

Fromraitosyo@gmail.com
Date2017-04-21 05:20 +0200
Subject[PATCH] power: supply: sbs-battery: fix the sbs interrupt request
Message-ID<tyxgZ-CP-5@gated-at.bofh.it>
From: Ryosuke Saito <raitosyo@gmail.com>

Since we use the default primary handler for the irq, IRQF_ONESHOT must
be set. Otherwise the request fails and the following errors are
displayed:

genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 129
sbs-battery 0-000b: Failed to request irq: -22

Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
---
 drivers/power/supply/sbs-battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c
index 8bb2eb3..e07d570 100644
--- a/drivers/power/supply/sbs-battery.c
+++ b/drivers/power/supply/sbs-battery.c
@@ -820,7 +820,7 @@ static int sbs_probe(struct i2c_client *client,
 	}
 
 	rc = devm_request_threaded_irq(&client->dev, irq, NULL, sbs_irq,
-		IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+		IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
 		dev_name(&client->dev), chip);
 	if (rc) {
 		dev_warn(&client->dev, "Failed to request irq: %d\n", rc);
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web