[PATCH v2] RFC: pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP

Linus Walleij linus.walleij at linaro.org
Fri Nov 11 12:07:08 PST 2016

On Thu, Nov 10, 2016 at 7:30 PM, Stefan Wahren <stefan.wahren at i2se.com> wrote:
>> Linus Walleij <linus.walleij at linaro.org> hat am 10. November 2016 um 18:35
>> geschrieben:
>> It should be possible to use the GPIOLIB_IRQCHIP helper
>> library with the BCM2835 driver since it is a pretty straight
>> forward cascaded irqchip.
>> The only difference from other drivers is that the BCM2835
>> has several banks for a single gpiochip, and each bank has
>> a separate IRQ line. Instead of creating one gpiochip per
>> bank, a single gpiochip covers all banks GPIO lines. This
>> makes it necessary to resolve the bank ID in the IRQ
>> handler.
>> The GPIOLIB_IRQCHIP allows several IRQs to be cascaded off
>> the same gpiochip by calling gpiochip_set_chained_irqchip()
>> repeatedly, but we have been a bit short on examples
>> for how this should be handled in practice, so this is intended
>> as an example of how this can be achieved.
>> The old code did not model the chip as a chained interrupt
>> handler, but this patch also rectifies that situation.
> thanks for providing this patch. Unfortunately i don't have deeper knowledge
> about the BCM2835, but there is patch downstream in the Foundation Kernel which
> hasn't been upstreamed yet [1].
> Does it collide with your intention?

Yeah it does but it makes things easier not harder so I'm happy
to rebase my patch on top of it if someone can help me test
the end result.

Can someone submit that patch to me properly on top of the upstream

Linus Walleij

More information about the linux-rpi-kernel mailing list