basic_mmio_gpio: split into a gpio library and platform device
Allow GPIO_BASIC_MMIO_CORE to be used to provide an accessor library
for implementing GPIO drivers whilst abstracting the register access
detail. Based on a patch from Anton Vorontsov[1] and adapted to allow
bgpio_chip to be embedded in another structure.
Changes since v1:
- Register the gpio_chip in the platform device probe
1. https://lkml.org/lkml/2011/4/19/401
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 44235bd..b57ec09 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -70,8 +70,14 @@
comment "Memory mapped GPIO drivers:"
+config GPIO_BASIC_MMIO_CORE
+ tristate
+ help
+ Provides core functionality for basic memory-mapped GPIO controllers.
+
config GPIO_BASIC_MMIO
tristate "Basic memory-mapped GPIO controllers support"
+ select GPIO_BASIC_MMIO_CORE
help
Say yes here to support basic memory-mapped GPIO controllers.