]> git.baikalelectronics.ru Git - kernel.git/commit
sh-pfc: Support GPIO to IRQ mapping specified IRQ resources
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 11 Dec 2013 03:26:26 +0000 (04:26 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 12 Dec 2013 21:07:28 +0000 (22:07 +0100)
commit898a76fc1c0f21a9ffb497ec74d899cc61f0ae01
treeaff7db7fdcc8bdb3fe74f6313c2b8701cfdc9d0b
parent68c64d5655f4962b5e92e55c6e28b94a04649c7a
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: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
drivers/pinctrl/sh-pfc/core.c
drivers/pinctrl/sh-pfc/core.h
drivers/pinctrl/sh-pfc/gpio.c