]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit70c8f01a357ac74d223a632659787396fef1e649
treeaff7db7fdcc8bdb3fe74f6313c2b8701cfdc9d0b
parent5b46ac3a7723636082ec6234289517ca5b9c65af
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