diff options
author | Laurent Pinchart <laurentp@cse-semaphore.com> | 2008-07-28 10:43:22 +0200 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-07-28 07:40:48 -0500 |
commit | e193325e3e3de188ae2aa5207adc7129aacc5c9d (patch) | |
tree | da00df7d2a0e3d40160adbd63cb6408cc3e51f15 /arch/powerpc/sysdev/cpm2.c | |
parent | 4c920de37d29284d4cb65d76a97a567247c2ac32 (diff) | |
download | op-kernel-dev-e193325e3e3de188ae2aa5207adc7129aacc5c9d.zip op-kernel-dev-e193325e3e3de188ae2aa5207adc7129aacc5c9d.tar.gz |
cpm2: Implement GPIO LIB API on CPM2 Freescale SoC.
This patch implement GPIO LIB support for the CPM2 GPIOs. The code can
also be used for CPM1 GPIO port E, as both cores are compatible at the
register level.
Based on earlier work by Laurent Pinchart.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Cc: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/cpm2.c')
-rw-r--r-- | arch/powerpc/sysdev/cpm2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/cpm2.c b/arch/powerpc/sysdev/cpm2.c index 5a6c5df..9311778 100644 --- a/arch/powerpc/sysdev/cpm2.c +++ b/arch/powerpc/sysdev/cpm2.c @@ -377,3 +377,14 @@ void cpm2_set_pin(int port, int pin, int flags) else clrbits32(&iop[port].odr, pin); } + +static int cpm_init_par_io(void) +{ + struct device_node *np; + + for_each_compatible_node(np, NULL, "fsl,cpm2-pario-bank") + cpm2_gpiochip_add32(np); + return 0; +} +arch_initcall(cpm_init_par_io); + |