Skip to content

RFC gpio: make irq_chip immutable

Peng Fan (OSS) linux-arm-kernel linux-gpio lkml 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20250509-gpio-c09a49e972ba

Versions newest first

  1. v1 RFC Latest9 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/9gpio: bcm-kona: make irq_chip immutabledrivers/gpio/gpio-bcm-kona.c+1 -00 replies
2/9gpio: grgpio: Make irq_chip immutabledrivers/gpio/gpio-grgpio.c+6 -10 replies
3/9gpio: lpc18xx: Make irq_chip immutabledrivers/gpio/gpio-lpc18xx.c+11 -20 replies
4/9gpio: mpc8xxx: Make irq_chip immutabledrivers/gpio/gpio-mpc8xxx.c+8 -00 replies
5/9gpio: davinci: Update irq chip datadrivers/gpio/gpio-davinci.c+7 -130 replies
6/9gpio: davinci: Make irq_chip immutabledrivers/gpio/gpio-davinci.c+7 -20 replies
7/9gpio: xgene-sb: Make irq_chip immutabledrivers/gpio/gpio-xgene-sb.c+23 -30 replies
8/9gpio: timberdale: Make irq_chip immutabledrivers/gpio/gpio-timberdale.c+9 -11 reply
9/9gpio: pxa: Make irq_chip immutabledrivers/gpio/gpio-pxa.c+7 -10 replies

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLinus Walleij
SeriesR-b
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH RFC 0/9] gpio: make irq_chip immutable

This might be a bit late to post this patchset, since it is almost rc6, but no rush here. Not expect this patchset be in 6.16.

This is an effort to make irq_chip immutable to elimnate the kernel warning "not an immutable chip, please consider fixing!"

The major changes
- add "gpiochip_disable_irq(gc, hwirq)" to end of mask hook
- add "gpiochip_enable_irq(gc, hwirq)" to start of unmask hook
- add IMMUTABLE flag
- add GPIOCHIP_IRQ_RESOURCE_HELPERS

For davinci, two patches are made, 1st is to update irq chip data, 2nd make irq_chip immutable.
For xgene-sb, two functions are added, because previous driver directly use irq_chip_unmask_parent and irq_chip_mask_parent.

In some patches, I use irqd_to_hwirq(d) to get hwirq; in others, I direclty use d->hwirq to align with previous code.

Some Kconfig entries do not select GPILIB_IRQCHIP, but I tried to build pxa_defconfig lpc18xx_defconfig and multi_v7_defconfig, GPIOLIB_IRQCHIP is y.
Not sure we should select GPIOLIB_IRQCHIP for them, because if deselect GPIOLIB_IRQCHIP, there will be build failure.

I not have platform to test the code, just best effort to do this patchset.

---
Peng Fan (9):
gpio: bcm-kona: make irq_chip immutable
gpio: grgpio: Make irq_chip immutable
gpio: lpc18xx: Make irq_chip immutable
gpio: mpc8xxx: Make irq_chip immutable
gpio: davinci: Update irq chip data
gpio: davinci: Make irq_chip immutable
gpio: xgene-sb: Make irq_chip immutable
gpio: timberdale: Make irq_chip immutable
gpio: pxa: Make irq_chip immutable

 drivers/gpio/gpio-bcm-kona.c   |  1 +
 drivers/gpio/gpio-davinci.c    | 29 ++++++++++++++---------------
 drivers/gpio/gpio-grgpio.c     |  7 ++++++-
 drivers/gpio/gpio-lpc18xx.c    | 13 +++++++++++--
 drivers/gpio/gpio-mpc8xxx.c    |  8 ++++++++
 drivers/gpio/gpio-pxa.c        |  8 +++++++-
 drivers/gpio/gpio-timberdale.c | 10 +++++++++-
 drivers/gpio/gpio-xgene-sb.c   | 26 +++++++++++++++++++++++---
 8 files changed, 79 insertions(+), 23 deletions(-)

---
base-commit: f48887a98b78880b7711aca311fbbbcaad6c4e3b
change-id: 20250509-gpio-c09a49e972ba

Best regards,

Signature · 1 line
Peng Fan <[email protected]>