Re: [WIP] Port xilinx gpio to GPIO_GENERIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 11, 2018 at 9:37 PM Hedges Alexander
<ahedges@xxxxxxxxxxxxxxx> wrote:

> This is my first try switching gpio-xilinx to GPIO_GENERIC. Most of the work
> here is based on the EP93xx GPIO which is the only example I found using
> multiple banks and bgpio_init.

To be honest the EP93xx is in pretty bad shape. I am sweating over
refactoring that thing now, something that brings in fixing the whole
platform.

Anyways this is looking good.

Adding a few banks of generic GPIO with bgpio_init() should
simplify things, and adding IRQchips on top per-bank should work
too these days.

If you have this situation:

- Several banks of GPIOs
- One IRQ per bank
- Still just one DT node for all of it

The recently added gpio-mt7621.c does have several banks
of GPIO and creates one gpiochip for each of them, and assigns
an IRQ for each of them as well. So look at this driver,
merged for v4.19-rc1.

In drivers/pinctrl/nomadik/pinctrl-nomadik.c you have something
else: a single gpiochip with two IRQs: one normal and one
"latent" for IRQs fired when the system is in suspend.
In this case we add two chained IRQs to the same gpiochip.
That works a bit so-so.

Yours,
Linus Walleij



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux