[PATCH v1 2/2] regulator: pf9453: Allow shared IRQ

Franz Schnyder posted 2 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v1 2/2] regulator: pf9453: Allow shared IRQ
Posted by Franz Schnyder 1 month, 1 week ago
From: Franz Schnyder <franz.schnyder@toradex.com>

The PF9453 datasheet specifies the IRQ_B pin as an open drain output
with level-low behavior. This makes it capable to share the interrupt
line.

Set the IRQF_SHARED to be able to share the interrupt line with
other devices.

Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
---
 drivers/regulator/pf9453-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/pf9453-regulator.c b/drivers/regulator/pf9453-regulator.c
index eed3055d1c1c..a7cec687a3e3 100644
--- a/drivers/regulator/pf9453-regulator.c
+++ b/drivers/regulator/pf9453-regulator.c
@@ -809,7 +809,7 @@ static int pf9453_i2c_probe(struct i2c_client *i2c)
 	}
 
 	ret = devm_request_threaded_irq(pf9453->dev, pf9453->irq, NULL, pf9453_irq_handler,
-					IRQF_ONESHOT,
+					(IRQF_ONESHOT | IRQF_SHARED),
 					"pf9453-irq", pf9453);
 	if (ret)
 		return dev_err_probe(pf9453->dev, ret, "Failed to request IRQ: %d\n", pf9453->irq);
-- 
2.43.0
Re: [PATCH v1 2/2] regulator: pf9453: Allow shared IRQ
Posted by Mark Brown 1 month ago
On Wed, Feb 18, 2026 at 11:25:15AM +0100, Franz Schnyder wrote:

> Set the IRQF_SHARED to be able to share the interrupt line with
> other devices.

This won't actually work properly, the existing interrupt handler
unconditionally returns IRQ_HANDLED so it will flag as having handled
the interrupt even if it was another device that triggered the
interrupt.  The driver needs to be changed to return IRQ_NONE if there
were no interrupts flagged by the device so that other devices sharing
the line get a chance to run.