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>
This commit is contained in:
committed by
Kumar Gala
parent
4c920de37d
commit
e193325e3e
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user