mbox series

[00/17] Mass convert GPIO IRQ chips to be immutable

Message ID 20230215-immutable-chips-v1-0-51a8f224a5d0@linaro.org
Headers show
Series Mass convert GPIO IRQ chips to be immutable | expand

Message

Linus Walleij Feb. 16, 2023, 9:37 a.m. UTC
We are getting tired of these irq_chips not getting converted
to be immutable, so I just take out the big hammer and fix
some that I deem not too complex as best I can.

I stopped after doing some, I will take another sweep at some
point I guess.

Please test if you have the hardware. The OMAP patch especially,
hi Tony ;)

I don't expect this to be merged to v6.3, but as Bartosz may
feel it is fixes material they are of course fine to trickle
in on a case-by-case basis.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Linus Walleij (17):
      gpio: altera: Convert to immutable irq_chip
      gpio: adnp: Convert to immutable irq_chip
      gpio: aspeed: Convert to immutable irq_chip
      gpio: aspeed-sgpio: Convert to immutable irq_chip
      gpio: ath79: Convert to immutable irq_chip
      gpio: cadence: Convert to immutable irq_chip
      gpio: eic_sprd: Convert to immutable irq_chip
      gpio: hisi: Convert to immutable irq_chip
      gpio: hlwd: Convert to immutable irq_chip
      gpio: idt3243x: Convert to immutable irq_chip
      gpio: msc313: Convert to immutable irq_chip
      gpio: mlxbf2: Convert to immutable irq_chip
      gpio: max732x: Convert to immutable irq_chip
      gpio: omap: Drop irq_base
      gpio: omap: Convert to immutable irq_chip
      gpio: pci-idio-16: Convert to immutable irq_chip
      gpio: pcie-idio-24: Convert to immutable irq_chip

 drivers/gpio/gpio-adnp.c         |  9 ++++-
 drivers/gpio/gpio-altera.c       | 25 +++++++-----
 drivers/gpio/gpio-aspeed-sgpio.c | 44 +++++++++++++++++----
 drivers/gpio/gpio-aspeed.c       | 44 ++++++++++++++++++---
 drivers/gpio/gpio-ath79.c        |  8 +++-
 drivers/gpio/gpio-cadence.c      | 10 +++--
 drivers/gpio/gpio-eic-sprd.c     | 33 +++++++++++-----
 drivers/gpio/gpio-hisi.c         | 25 +++++++-----
 drivers/gpio/gpio-hlwd.c         | 33 ++++++++++++----
 drivers/gpio/gpio-idt3243x.c     | 11 ++++--
 drivers/gpio/gpio-max732x.c      |  8 +++-
 drivers/gpio/gpio-mlxbf2.c       | 32 ++++++++++++----
 drivers/gpio/gpio-msc313.c       | 26 +++++++++++--
 drivers/gpio/gpio-omap.c         | 83 ++++++++++++++++++++++------------------
 drivers/gpio/gpio-pci-idio-16.c  | 12 ++++--
 drivers/gpio/gpio-pcie-idio-24.c | 12 ++++--
 16 files changed, 297 insertions(+), 118 deletions(-)
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230215-immutable-chips-762922277f1e

Best regards,

Comments

Tony Lindgren Feb. 17, 2023, 6:02 a.m. UTC | #1
* Linus Walleij <linus.walleij@linaro.org> [230216 09:37]:
> Please test if you have the hardware. The OMAP patch especially,
> hi Tony ;)

Looking good so far, will do some more testing today.

Thanks,

Tony
Andreas Kemnade Feb. 17, 2023, 4:31 p.m. UTC | #2
On Fri, 17 Feb 2023 09:49:37 +0200
Tony Lindgren <tony@atomide.com> wrote:

> Hi,
> 
> * Linus Walleij <linus.walleij@linaro.org> [230216 09:38]:
> > Convert the driver to immutable irq-chip with a bit of
> > intuition.
> > 
> > This driver require some special care: .irq_ack() was copied
> > from dummy_irq_chip where it was defined as noop. This only
> > makes sense if using handle_edge_irq() that will unconditionally
> > call .irq_ack() to avoid a crash, but this driver is not ever
> > using handle_edge_irq() so just avoid assigning .irq_ack().
> > 
> > A separate chip had to be created for the non-wakeup instance.  
> 
> Nice, works for me.
> 
> BTW, I still see these warnings remaining on boot:
> 
> gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
> 
> Seems like we might be able to get rid of those too now or are
> there still some dependencies with /sys/class/gpio for example?
> 
on what are you testing? on -next? I thought I have fixed theese warning with
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92bf78b33b0b463b00c6b0203b49aea845daecc8

Regards,
Andreas
Tony Lindgren March 6, 2023, 7:28 a.m. UTC | #3
* Andreas Kemnade <andreas@kemnade.info> [230217 16:31]:
> On Fri, 17 Feb 2023 09:49:37 +0200
> Tony Lindgren <tony@atomide.com> wrote:
> 
> > Hi,
> > 
> > * Linus Walleij <linus.walleij@linaro.org> [230216 09:38]:
> > > Convert the driver to immutable irq-chip with a bit of
> > > intuition.
> > > 
> > > This driver require some special care: .irq_ack() was copied
> > > from dummy_irq_chip where it was defined as noop. This only
> > > makes sense if using handle_edge_irq() that will unconditionally
> > > call .irq_ack() to avoid a crash, but this driver is not ever
> > > using handle_edge_irq() so just avoid assigning .irq_ack().
> > > 
> > > A separate chip had to be created for the non-wakeup instance.  
> > 
> > Nice, works for me.
> > 
> > BTW, I still see these warnings remaining on boot:
> > 
> > gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
> > 
> > Seems like we might be able to get rid of those too now or are
> > there still some dependencies with /sys/class/gpio for example?
> > 
> on what are you testing? on -next? I thought I have fixed theese warning with
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92bf78b33b0b463b00c6b0203b49aea845daecc8

You're right, sorry looks like I pasted the wrong line from the dmesg
output :)

I intended to paste this example instead of the static allocation line:

gpio gpiochip1: (gpio-32-63): not an immutable chip, please consider fixing it!

Regards,

Tony
Tony Lindgren March 6, 2023, 7:31 a.m. UTC | #4
* Tony Lindgren <tony@atomide.com> [230306 07:28]:
> * Andreas Kemnade <andreas@kemnade.info> [230217 16:31]:
> > On Fri, 17 Feb 2023 09:49:37 +0200
> > Tony Lindgren <tony@atomide.com> wrote:
> > 
> > > Hi,
> > > 
> > > * Linus Walleij <linus.walleij@linaro.org> [230216 09:38]:
> > > > Convert the driver to immutable irq-chip with a bit of
> > > > intuition.
> > > > 
> > > > This driver require some special care: .irq_ack() was copied
> > > > from dummy_irq_chip where it was defined as noop. This only
> > > > makes sense if using handle_edge_irq() that will unconditionally
> > > > call .irq_ack() to avoid a crash, but this driver is not ever
> > > > using handle_edge_irq() so just avoid assigning .irq_ack().
> > > > 
> > > > A separate chip had to be created for the non-wakeup instance.  
> > > 
> > > Nice, works for me.
> > > 
> > > BTW, I still see these warnings remaining on boot:
> > > 
> > > gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
> > > 
> > > Seems like we might be able to get rid of those too now or are
> > > there still some dependencies with /sys/class/gpio for example?
> > > 
> > on what are you testing? on -next? I thought I have fixed theese warning with
> > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92bf78b33b0b463b00c6b0203b49aea845daecc8
> 
> You're right, sorry looks like I pasted the wrong line from the dmesg
> output :)
> 
> I intended to paste this example instead of the static allocation line:
> 
> gpio gpiochip1: (gpio-32-63): not an immutable chip, please consider fixing it!

Hmm, nope, sorry it seems I was just confused between two patches.
Hopefully all the gpio warnings will be gone with this $subject patch
applied.

Regards,

Tony