Skip to content
Commit 70c8f01a authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Linus Walleij
Browse files

sh-pfc: Support GPIO to IRQ mapping specified IRQ resources



On non-DT platforms IRQ controllers associated with the GPIOs have a
fixed IRQ base value known at compile time. The sh-pfc driver translates
GPIO number to IRQ numbers using a hardcoded table. This mechanism
breaks on DT platforms, as the IRQ base values are dynamic in that case.

Fix this by specifying IRQs associated with GPIOs in IRQ resources,
populated automatically from the device tree. When IRQ resources are
specified the driver requires one IRQ resource per GPIO able to generate
an interrupt, and uses the translation table to compute the IRQ resource
offset instead of the IRQ number.

Cc: devicetree@vger.kernel.org
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5b46ac3a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment