mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing
@ 2026-02-18 10:25 Franz Schnyder
  2026-02-18 10:25 ` [PATCH v1 1/2] regulator: pf9453: Respect IRQ trigger settings from firmware Franz Schnyder
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Franz Schnyder @ 2026-02-18 10:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: Franz Schnyder, linux-kernel, Francesco Dolcini

From: Franz Schnyder <franz.schnyder@toradex.com>

The IRQ_B pin is an open-drain output. The datasheet specifies, that the
IRQ_B pin is pulled low when any unmasked interrupt bit status          
is changed, and it is released high once the application processor reads
the INT1 register. As it specifies a level-low behavior, it should not  
force a falling-edge interrupt.                                         
                                                                        
Remove the IRQF_TRIGGER_FALLING to not force the falling-edge interrupt 
and instead rely on the flag from the device tree.                      
Set the IRQF_SHARED to be able to share the interrupt line with         
other devices. 

Franz Schnyder (2):
  regulator: pf9453: Respect IRQ trigger settings from firmware
  regulator: pf9453: Allow shared IRQ

 drivers/regulator/pf9453-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.43.0


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

* [PATCH v1 1/2] regulator: pf9453: Respect IRQ trigger settings from firmware
  2026-02-18 10:25 [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing Franz Schnyder
@ 2026-02-18 10:25 ` Franz Schnyder
  2026-02-18 10:25 ` [PATCH v1 2/2] regulator: pf9453: Allow shared IRQ Franz Schnyder
  2026-03-03 11:20 ` [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Franz Schnyder @ 2026-02-18 10:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Franz Schnyder, linux-kernel, Francesco Dolcini, stable

From: Franz Schnyder <franz.schnyder@toradex.com>

The datasheet specifies, that the IRQ_B pin is pulled low when any
unmasked interrupt bit status is changed, and it is released high once
the application processor reads the INT1 register. As it specifies a
level-low behavior, it should not force a falling-edge interrupt.

Remove the IRQF_TRIGGER_FALLING to not force the falling-edge interrupt
and instead rely on the flag from the device tree.

Fixes: 0959b6706325 ("regulator: pf9453: add PMIC PF9453 support")
Cc: stable@vger.kernel.org
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 779a6fdb0574..eed3055d1c1c 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_TRIGGER_FALLING | IRQF_ONESHOT),
+					IRQF_ONESHOT,
 					"pf9453-irq", pf9453);
 	if (ret)
 		return dev_err_probe(pf9453->dev, ret, "Failed to request IRQ: %d\n", pf9453->irq);
-- 
2.43.0


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

* [PATCH v1 2/2] regulator: pf9453: Allow shared IRQ
  2026-02-18 10:25 [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing Franz Schnyder
  2026-02-18 10:25 ` [PATCH v1 1/2] regulator: pf9453: Respect IRQ trigger settings from firmware Franz Schnyder
@ 2026-02-18 10:25 ` Franz Schnyder
  2026-03-02  0:25   ` Mark Brown
  2026-03-03 11:20 ` [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Franz Schnyder @ 2026-02-18 10:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: Franz Schnyder, linux-kernel, Francesco Dolcini

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


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

* Re: [PATCH v1 2/2] regulator: pf9453: Allow shared IRQ
  2026-02-18 10:25 ` [PATCH v1 2/2] regulator: pf9453: Allow shared IRQ Franz Schnyder
@ 2026-03-02  0:25   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-03-02  0:25 UTC (permalink / raw)
  To: Franz Schnyder
  Cc: Liam Girdwood, Franz Schnyder, linux-kernel, Francesco Dolcini

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

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.

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

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

* Re: [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing
  2026-02-18 10:25 [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing Franz Schnyder
  2026-02-18 10:25 ` [PATCH v1 1/2] regulator: pf9453: Respect IRQ trigger settings from firmware Franz Schnyder
  2026-02-18 10:25 ` [PATCH v1 2/2] regulator: pf9453: Allow shared IRQ Franz Schnyder
@ 2026-03-03 11:20 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-03-03 11:20 UTC (permalink / raw)
  To: Liam Girdwood, Franz Schnyder
  Cc: Franz Schnyder, linux-kernel, Francesco Dolcini

On Wed, 18 Feb 2026 11:25:13 +0100, Franz Schnyder wrote:
> The IRQ_B pin is an open-drain output. The datasheet specifies, that the
> IRQ_B pin is pulled low when any unmasked interrupt bit status
> is changed, and it is released high once the application processor reads
> the INT1 register. As it specifies a level-low behavior, it should not
> force a falling-edge interrupt.
> 
> Remove the IRQF_TRIGGER_FALLING to not force the falling-edge interrupt
> and instead rely on the flag from the device tree.
> Set the IRQF_SHARED to be able to share the interrupt line with
> other devices.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/2] regulator: pf9453: Respect IRQ trigger settings from firmware
      commit: 2d85ecd6fb0eb2fee0ffa040ec1ddea57b09bc38
[2/2] regulator: pf9453: Allow shared IRQ
      commit: e84141846decb77d2826e553318a608b256804e5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

end of thread, other threads:[~2026-03-03 11:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-18 10:25 [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing Franz Schnyder
2026-02-18 10:25 ` [PATCH v1 1/2] regulator: pf9453: Respect IRQ trigger settings from firmware Franz Schnyder
2026-02-18 10:25 ` [PATCH v1 2/2] regulator: pf9453: Allow shared IRQ Franz Schnyder
2026-03-02  0:25   ` Mark Brown
2026-03-03 11:20 ` [PATCH v1 0/2] regulator: pf9453: Fix IRQ trigger and allow sharing Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®