Messages in this thread |  | | From | Aidan MacDonald <> | Subject | Re: [PATCH 3/3] gpio: regmap: Support a custom ->to_irq() hook | Date | Wed, 06 Jul 2022 21:53:36 +0100 |
| |
Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> On Tue, Jul 5, 2022 at 1:22 PM Aidan MacDonald > <aidanmacdonald.0x0@gmail.com> wrote: > > ... > >> Is that really better than simply using ->to_irq()? > > We have Intel PMIC drivers (that are in MFD) and they have respective > GPIO drivers, none of them is using ->to_irq() and all of them provide > IRQ functionality. Can it be taken as an example or is it something > quite different to your hardware?
In the Intel PMICs the MFD irqchip has a single interrupt for all GPIOs. The GPIO driver then has its own irqchip and it looks at other registers to find out which GPIO interrupt fired. It's a typical cascaded setup.
In my case the MFD irqchip has one interrupt per GPIO. The GPIO driver does not need its own irqchip; everything is handled by the MFD irqchip. Existing examples include wm831x, wm8994, da9052, and tps6586x.
|  |