drivers/gpio: Switch gpio-mpc8xxx to use gpio-generic
authorLiu Gang <Gang.Liu@nxp.com>
Wed, 3 Feb 2016 11:27:34 +0000 (19:27 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 8 Feb 2016 17:32:58 +0000 (18:32 +0100)
commit42178e2a1e42b480ada954750f248b53d3fb5940
tree3a19411d6c0c695ba4470752f48ca24e32b12f24
parentdaec0beda6fd7a741e4381741b3f7ff15970fdf6
drivers/gpio: Switch gpio-mpc8xxx to use gpio-generic

The new Layerscape platforms has the same ip block/controller
as GPIO on PowerPC platforms(MPC8XXX), but the GPIO registers
may be big or little endian. So the code needs to get the
endian property from DTB, then make additional functions to
fit all the PowerPC/Layerscape GPIO register read/write
operations.

gpio-generic.c provides an universal infrastructure for both
big and little endian register operations. So switch the
gpio-mpc8xxx to use gpio-generic can simplify the driver and
reduce a lot of code.

The IRQ and some workaround parts in gpio-mpc8xxx.c will be
updated with the new API interfaces but following the
original functionalities.

Signed-off-by: Liu Gang <Gang.Liu@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mpc8xxx.c