Skip to contentSkip to conversation

power: supply: sbs-battery: fix the sbs interrupt request

PATCH In review [email protected] 2 participants 2 messages Apr 21, 2017 – May 1, 2017 Power supply

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: supply: sbs-battery: fix the sbs interrupt request

From: Ryosuke Saito <[email protected]>

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

---
 drivers/power/supply/sbs-battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/sbs-battery.c +1 -1
index 8bb2eb3..e07d570 100644
@@ -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);
Signature · 1 line
2.7.4
#1 lore raw

Hi,

Quoted 10 lines · On Fri, Apr 21, 2017 at 12:13:17PM +0900, [email protected] wrote:

From: Ryosuke Saito <[email protected]>

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

Thanks, queued.

-- Sebastian