gpio/omap: auto-setup a GPIO pin when used as an IRQ line

To use a GPIO pin as an interrupt line, two previous configuration
has to be made:

a) Map the GPIO pin as an interrupt line into the Linux irq space
b) Enable the GPIO bank and configure the GPIO direction as input

Most GPIO/IRQ chip drivers just create a mapping for every single
GPIO pin with irq_create_mapping() on .probe so users usually can
assume a) and only have to do b) by using the following sequence:

gpio_request(gpio, "foo IRQ");
gpio_direction_input(gpio);

and then request a IRQ with:

irq = gpio_to_irq(gpio);
request_irq(irq, ...);

Some drivers know that their IRQ line is being driven by a GPIO but
others don't. These drivers just know that have an IRQ line and
don't care if is a real IRQ line from an interrupt controller or a
GPIO pin acting as an IRQ.

In these cases board files did all the necessary GPIO setup so the
drivers could only call request_irq() on the provided IRQ.

Unfortuntaly this does not work when booting with Device Trees since
the OF irq core does neither request the GPIO nor set its direction.

A DTS just defines the GPIO controller phandle as a interrupt-parent
so drivers get the mapped GPIO-IRQ line but request_irq() fails since
the setup was never made.

A previous attempt to solve this issue is commit b4419e1a1
("gpio/omap: auto request GPIO as input if used as IRQ via DT") but
the patch was reverted since it broke OMAP1 platforms.

This patch solves this issue with a different approach by doing all
the needed hardware setup on the GPIO/IRQ chip driver when a call to
request_irq() is made.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>