NOT meaningless ... when there's actual IP behind
the controller! Which, at first, is what I thought
OK, how about resubmitting? With that name?
Be sure to add a bit of documentation about
the controller requirements ... basically that
it has a register from which all values can be
read, and that either that register can be written,
or there's a pair of set-bit/clear-bit registers
affecting that register and the output pins.
Might be worth mentioning how trivial it is to do
that in hardware like CPLDs/FPGAS/etc, which is
why this handles different word sizes/endianness.
and the expectation that in at least some cases
this will be used with roll-your-own ASIC/FPGA
No, keep it; files move around sometimes, and it's
best if that loses no information.
The basic GPIO controllers may be found in various on-board FPGA
and ASIC solutions that are used to control board's switches, LEDs,
chip-selects, Ethernet/USB PHY power, etc.
Usually these controllers do not privide any means of pin setup
The driver provides:
- Support for 8/16/32/64 bits registers;
- Support for GPIO controllers with clear/set registers;
- Support for GPIO controllers with a single "data" register;
- Support for big endian bits/GPIOs ordering (mostly used on PowerPC).
Signed-off-by: Anton Vorontsov <email@example.com>
On Thu, Aug 26, 2010 at 03:48:31PM -0700, David Brownell wrote:
Also addressed Mark's comments wrt getting resources
by name. Plus, it appears that there's also gc.dev field
in gpio_chip, fill it too.
I hope it's perfect now. :-)
drivers/gpio/Kconfig | 5 +
drivers/gpio/Makefile | 1 +
drivers/gpio/basic_mmio_gpio.c | 278 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 284 insertions(+), 0 deletions(-)
create mode 100644 drivers/gpio/basic_mmio_gpio.c
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index f623953..d1d1c24 100644
@@ -70,6 +70,11 @@ config GPIO_MAX730X
comment "Memory mapped GPIO expanders:"
+ tristate "Basic memory-mapped GPIO controllers support"
+ Say yes here to support basic memory-mapped GPIO controllers.
tristate "IT8761E GPIO support"
depends on GPIOLIB
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index a69e060..dfb571b 100644
@@ -10,6 +10,7 @@ obj-$(CONFIG_GPIOLIB) += gpiolib.o
obj-$(CONFIG_GPIO_ADP5520) += adp5520-gpio.o
obj-$(CONFIG_GPIO_ADP5588) += adp5588-gpio.o
+obj-$(CONFIG_GPIO_BASIC_MMIO) += basic_mmio_gpio.o
obj-$(CONFIG_GPIO_LANGWELL) += langwell_gpio.o
obj-$(CONFIG_GPIO_MAX730X) += ...