[PATCH 2/2 V3] drivers/gpio: Switch gpio-mpc8xxx to use gpio-generic

Gang Liu gang.liu at nxp.com
Sun Jan 24 23:47:26 PST 2016


Hi, Linus Walleij,

I rewrote the patches following your comments based on the gpio-generic infrastructure. 
Do you have some comments for the new patches? Or could you please help to apply the patches?

Thanks!
Liu Gang

-----Original Message-----
From: Liu Gang [mailto:Gang.Liu at nxp.com] 
Sent: Tuesday, January 12, 2016 8:10 PM
To: linus.walleij at linaro.org; linux-gpio at vger.kernel.org; linux-arm-kernel at lists.infradead.org
Cc: robh+dt at kernel.org; Bhupesh Sharma <bhupesh.sharma at nxp.com>; scottwood at nxp.com; LeoLi at nxp.com; Gang Liu <gang.liu at nxp.com>; Gang Liu <gang.liu at nxp.com>
Subject: [PATCH 2/2 V3] 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 at nxp.com>
---
-V3: Switch gpio-mpc8xxx to use gpio-generic for both
     little, big endian kinds of GPIO register following
     Linus Walleij comments.

 drivers/gpio/gpio-mpc8xxx.c | 270 ++++++++++++++++++--------------------------
 1 file changed, 109 insertions(+), 161 deletions(-)



More information about the linux-arm-kernel mailing list