mbox series

[0/3] gpio: drop a few unneeded irq_{request,release}_resources implementations

Message ID 20190208115201.7518-1-thomas.petazzoni@bootlin.com
Headers show
Series gpio: drop a few unneeded irq_{request,release}_resources implementations | expand

Message

Thomas Petazzoni Feb. 8, 2019, 11:51 a.m. UTC
Hello,

Three GPIO drivers in the tree implement the
irq_{request,release}_resources hooks with what is in fact the default
implementation provided by the GPIO core, making this driver-specific
code redundant.

It is worth mentioning that I do not own any of the affected
platforms, to the three patches have only been built-tested. Each is
Cc'ed to the appropriate maintainer, except gpio-em that has no
platform-specific maintainer.

Best regards,

Thomas Petazzoni

Thomas Petazzoni (3):
  gpio: bcm-kona: drop ->irq_{request,release}_resources hooks
  gpio: dwapb: drop ->irq_{request,release}_resources hooks
  gpio: em: drop ->irq_{request,release}_resources hooks

 drivers/gpio/gpio-bcm-kona.c | 16 ----------------
 drivers/gpio/gpio-dwapb.c    | 27 ---------------------------
 drivers/gpio/gpio-em.c       | 25 -------------------------
 3 files changed, 68 deletions(-)

Comments

Linus Walleij Feb. 8, 2019, 2:44 p.m. UTC | #1
On Fri, Feb 8, 2019 at 12:52 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:

> Three GPIO drivers in the tree implement the
> irq_{request,release}_resources hooks with what is in fact the default
> implementation provided by the GPIO core, making this driver-specific
> code redundant.

So you could think!

But the GPIOLIB_IRQCHIP code only kicks in if the GPIO driver
is using the gpiolib irqchip helpers, i.e. calls gpiolib_irqchip_add_*.
And those three are the ones that still have to implement their
own irqchips.

The helpers did come about because all drivers started to
duplicate code like this.

The designware chip should ideally be converted to use
hierarchical irqdomain since that seems to be what it is doing,
but I think the hierarchical irqdomain didn't even exist when that
driver was submitted.

Yours,
Linus Walleij