gpio: add a vtable to abstract GPIO controller operations

A common pattern to implement object oriented code in the kernel is
to use a separate structure to hold all the methods for a particular
kind of object and just have a pointer to this table rather than a
separate pointer for each method.

The alternate approach is to directly embedded function pointers in
the object but there are some advantages on using the former approach.

This patch adds a struct gpio_chip_ops to be set by GPIO chip controllers.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
gpiolib: set gpio_chip operations on add using a gpio_chip_ops

This is a transitional change to avoid breaking git bisect-ability
while converting GPIO controller drivers to set their operations by
using the newly introduced struct gpio_chip_ops virtual function table.

It should be removed once all GPIO chip drivers have been converted.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
gpio: omap: convert driver to use gpio_chip_ops

The GPIO controller operations has been split to be stored
on a separate struct gpio_chip_ops virtual function table.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
gpio: twl4030: convert driver to use gpio_chip_ops

The GPIO controller operations has been split to be stored
on a separate struct gpio_chip_ops virtual function table.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
gpio: switch to use struct struct gpio_chip_ops

All GPIO controller drivers have been migrated to use the struct
gpio_chip_ops virtual function table so the embeddeded function
pointers in struct gpio_chip can now be removed.

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