powerpc: add driver for simple GPIO banks
RFC PATCH 1/2 powerpc: add driver for simple GPIO banks
The driver supports very simple GPIO controllers, that is, when a controller provides just a 'data' register. Such controllers may be found in various BCSRs (Board's FPGAs used to control board's switches, LEDs, chip-selects, Ethernet/USB PHY power, etc).
So far we support only 1-byte GPIO banks. Support for other widths may be implemented when/if needed.
Signed-off-by Anton Vorontsov <[email protected]>
---
This is evolution of the `PIXIS FPGA' GPIO controller:
http://ozlabs.org/pipermail/linuxppc-dev/2008-May/056731.html
Since for MPC8360E-MDS I need the same driver, I though it would be great to do something generic.
arch/powerpc/sysdev/Kconfig | 8 ++ arch/powerpc/sysdev/Makefile | 2 + arch/powerpc/sysdev/of_simple_gpio.c | 154 ++++++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/sysdev/of_simple_gpio.c
arch/powerpc/sysdev/Kconfig +8 -0
@@ -6,3 +6,11 @@ config PPC4xx_PCI_EXPRESS bool depends on PCI && 4xx default n + +config OF_SIMPLE_GPIO + bool + depends on PPC + select GENERIC_GPIO + select ARCH_REQUIRE_GPIOLIB + help + Support for simple, memory-mapped GPIO controllers.
arch/powerpc/sysdev/Makefile +2 -0
@@ -36,6 +36,8 @@ ifeq ($(CONFIG_PCI),y) obj-$(CONFIG_4xx) += ppc4xx_pci.o endif +obj-$(CONFIG_OF_SIMPLE_GPIO) += of_simple_gpio.o + # Temporary hack until we have migrated to asm-powerpc ifeq ($(ARCH),powerpc) obj-$(CONFIG_CPM) += cpm_common.o
arch/powerpc/sysdev/of_simple_gpio.c new file +154 -0
154 lines not on this page · raw message
Signature · 1 line
1.5.6.3