aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/Makefile
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2020-05-28 16:58:44 +0200
committerLinus Walleij <linus.walleij@linaro.org>2020-06-03 10:48:37 +0200
commitebe363197e525ffbd279c729421f6f6c24d8d681 (patch)
tree0bf77c95342897330b8e07fb8c9dcadd68f970ab /drivers/gpio/Makefile
parentgpiolib: Introduce gpiochip_irqchip_add_domain() (diff)
downloadlinux-dev-ebe363197e525ffbd279c729421f6f6c24d8d681.tar.xz
linux-dev-ebe363197e525ffbd279c729421f6f6c24d8d681.zip
gpio: add a reusable generic gpio_chip using regmap
There are quite a lot simple GPIO controller which are using regmap to access the hardware. This driver tries to be a base to unify existing code into one place. This won't cover everything but it should be a good starting point. It does not implement its own irq_chip because there is already a generic one for regmap based devices. Instead, the irq_chip will be instantiated in the parent driver and its irq domain will be associate to this driver. For now it consists of the usual registers, like set (and an optional clear) data register, an input register and direction registers. Out-of-the-box, it supports consecutive register mappings and mappings where the registers have gaps between them with a linear mapping between GPIO offset and bit position. For weirder mappings the user can register its own .xlate(). Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200528145845.31436-3-michael@walle.cc Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/Makefile')
-rw-r--r--drivers/gpio/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 65bf3940e33c..1e4894e0bf0f 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_GPIO_SYSFS) += gpiolib-sysfs.o
obj-$(CONFIG_GPIO_ACPI) += gpiolib-acpi.o
# Device drivers. Generally keep list sorted alphabetically
+obj-$(CONFIG_GPIO_REGMAP) += gpio-regmap.o
obj-$(CONFIG_GPIO_GENERIC) += gpio-generic.o
# directly supported by gpio-generic