]> 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)
commitbb9c02f719781eade9c9d6e020002bc0837ecf46
treeaff7db7fdcc8bdb3fe74f6313c2b8701cfdc9d0b
parentd12a62f91207cab4dc7d97275af8d8e1e8857218
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