diff options
author | Laurent Pinchart <laurentp@cse-semaphore.com> | 2008-07-28 04:43:22 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-07-28 08:40:48 -0400 |
commit | e193325e3e3de188ae2aa5207adc7129aacc5c9d (patch) | |
tree | da00df7d2a0e3d40160adbd63cb6408cc3e51f15 /arch/powerpc/sysdev/cpm2.c | |
parent | 4c920de37d29284d4cb65d76a97a567247c2ac32 (diff) |
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 5a6c5dfc53ef..9311778a5082 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) | |||
377 | else | 377 | else |
378 | clrbits32(&iop[port].odr, pin); | 378 | clrbits32(&iop[port].odr, pin); |
379 | } | 379 | } |
380 | |||
381 | static int cpm_init_par_io(void) | ||
382 | { | ||
383 | struct device_node *np; | ||
384 | |||
385 | for_each_compatible_node(np, NULL, "fsl,cpm2-pario-bank") | ||
386 | cpm2_gpiochip_add32(np); | ||
387 | return 0; | ||
388 | } | ||
389 | arch_initcall(cpm_init_par_io); | ||
390 | |||